Re: Qustion about being "Giant-locked"

From: Xin LI <delphij_at_frontfree.net>
Date: Tue, 6 Apr 2004 18:59:43 +0800
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
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,
-- 
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


Received on Tue Apr 06 2004 - 02:00:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:50 UTC