Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2004 18:59:43 +0800
From:      Xin LI <delphij@frontfree.net>
To:        Artem Koutchine <matrix@itlegion.ru>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Qustion about being "Giant-locked"
Message-ID:  <20040406105943.GA2180@frontfree.net>
In-Reply-To: <001f01c41bab$ae842570$0c00a8c0@artem>
References:  <20040406071205.GA2819@frontfree.net> <001f01c41bab$ae842570$0c00a8c0@artem>

next in thread | previous in thread | raw e-mail | index | archive | help

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2004 at 11:49:20AM +0400, Artem Koutchine wrote:
> >> While booting i see many drivers marked
> >> as [Giant-locked].
> >> Is being Giant-locked good or bad what are the
> >> implications?
> >It's not good if you have a computer with multiple processors.
>=20
> Well, i do have dual xeon with HT (4 logical CPUs). Is there
> any way to fight giant-locked drivers or i just have to wait
> until the driver will be rewritten w/o Giant? Or there are
> some kernel options to disable Giant lock in the drivers?

You may have to wait until the driver will be fine-grainlly locked
down.

Giant Lock is a concept that was widely used in tradional Unix
kernels. Simply speaking, having Giant Locks means that all kernel
components must grab it before doing something which could not be
break in (for instance, when you are have read some data and is
going to update a part of it, you don't want others to read or
write in the same area).

In the good old days, when computers have only one processor installed,
this is quite efficient. However, when SMP is going to be a standard
deployment, the problem comes that your kernel won't run on all
processors when some part of it have grabbed a Giant Lock. Hence we
tend to use other synchronization mechanisms which will allow the
kernel to run on multiple processors without blowing things up.

The FreeBSD Project has a project called "SMPng project" which is
focused on implementing fine-grained SMP support for the FreeBSD
kernel. You can obtain detailed information here:
	http://www.freebsd.org/smp/

Additionally, the driver SMPng conversion progress could be tracked
on this page:
	http://www.freebsd.org/projects/busdma/

Cheers,
--=20
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAco2fOfuToMruuMARAiXaAJ9AZhuDt9lR59efAvL4UU9miiq89QCfc8Qt
iJqlNr1TAEzFK2ub6QflD5w=
=kdVZ
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040406105943.GA2180>