Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Mar 2005 12:22:09 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        net@freebsd.org
Subject:   Re: Giant-free polling [PATCH]
Message-ID:  <Pine.NEB.3.96L.1050312122019.79601B-100000@fledge.watson.org>
In-Reply-To: <20050311213544.GH9291@darkness.comp.waw.pl>

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

On Fri, 11 Mar 2005, Pawel Jakub Dawidek wrote:

> On Fri, Mar 11, 2005 at 01:14:38PM -0800, Julian Elischer wrote:
> +> >P> There is still an unresolved problem (in your and our patch as well) of
> +> >P> using ifnet structure fields without synchronization, as we don't have
> +> >P> access tointerface's internal mutex, which protects those fields.
> +> 
> +> you need to add an interface method that has access to it..
> 
> I was thinking more about moving interface mutex into ifnet structure,
> but Robert has some objections IIRC. 

My specific concern was to make sure that we don't lock device driver
writers into a locking model that forces them to protect the device driver
with a single mutex.  There are changes floating around to protect the
if_em receive and transmit components separately, since the're basically
independent hardware units and can be accessed from multiple CPUs in
parallel.  This is also, I believe, what several Linux device drivers do.

So I'm OK with a multi-layer mutex in ifnet protecting ifnet and device
driver data, but only if we don't preclude the parallelism benefits that
can be attained as suggested above.

Robert N M Watson




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1050312122019.79601B-100000>