If GIANT is locked can the MPSAFE parts run in parallel?
Robert Watson
rwatson at FreeBSD.org
Mon Mar 10 13:45:37 UTC 2008
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.
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-arch
mailing list