If GIANT is locked can the MPSAFE parts run in parallel?

Skalla Raabjorn skalla.raabjorn at gmx.de
Mon Mar 10 14:18:52 UTC 2008


On Mon, 10 Mar 2008 14:45:36 +0100 (BST)
Robert Watson <rwatson at FreeBSD.org> wrote:

> 
> On Mon, 10 Mar 2008, Skalla Raabjorn wrote:
> 
> > if GIANT is locked can the MPSAFE parts run in parallel? Like networking for 
> > example, as they have their own locks.
> 
> Dear Skalla,
> 
> Yes.  Giant is [almost] a mutex like any other mutex, so as long as the MPSAFE 
> subsystem isn't being invoked by something holding Giant, it generally won't 
> run with it.  Even if the network stack is sometimes executed with Giant held 
> (for example, when receiving a packet from SLIP), that doesn't prevent the 
> network stack from executing in parallel on other CPUs, it just serializes 
> with respect to other Giant holders executing.

Thanks, that's all I wanted to know :)


More information about the freebsd-arch mailing list