Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2008 14:45:36 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Skalla Raabjorn <skalla.raabjorn@gmx.de>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: If GIANT is locked can the MPSAFE parts run in parallel?
Message-ID:  <20080310143919.V50827@fledge.watson.org>
In-Reply-To: <20080310140753.24630bda@sol.hackerzberg.local>
References:  <20080310140753.24630bda@sol.hackerzberg.local>

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

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



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