Qustion about being "Giant-locked"

Xin LI delphij at frontfree.net
Tue Apr 6 04:00:12 PDT 2004

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.
> 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

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:

Additionally, the driver SMPng conversion progress could be tracked
on this page:

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040406/bd14bfe8/attachment.bin

More information about the freebsd-current mailing list