[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070925082457.6fec30d6@freepuppy.rosehill>
Date: Tue, 25 Sep 2007 08:24:57 -0700
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: hadi@...erus.ca
Cc: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>,
David Miller <davem@...emloft.net>, krkumar2@...ibm.com,
johnpol@....mipt.ru, herbert@...dor.apana.org.au, kaber@...sh.net,
jagana@...ibm.com, Robert.Olsson@...a.slu.se, rick.jones2@...com,
xma@...ibm.com, gaagaan@...il.com, netdev@...r.kernel.org,
rdreier@...co.com, mcarlson@...adcom.com, jeff@...zik.org,
mchan@...adcom.com, general@...ts.openfabrics.org,
kumarkr@...ux.ibm.com, tgraf@...g.ch, randy.dunlap@...cle.com,
sri@...ibm.com
Subject: Re: [PATCH 1/4] [NET_SCHED] explict hold dev tx lock
On Tue, 25 Sep 2007 09:15:38 -0400
jamal <hadi@...erus.ca> wrote:
> On Mon, 2007-24-09 at 17:14 -0700, Stephen Hemminger wrote:
>
> > Since we are redoing this,
> > is there any way to make the whole TX path
> > more lockless? The existing model seems to be more of a monitor than
> > a real locking model.
>
http://en.wikipedia.org/wiki/Monitor_(synchronization)
> What do you mean it is "more of a monitor"?
The transmit code path is locked as a code region, rather than just object locking
on the transmit queue or other fine grained object. This leads to moderately long
lock hold times when multiple qdisc's and classification is being done.
>
> On the challenge of making it lockless:
> About every NAPI driver combines the tx prunning with rx polling. If you
> are dealing with tx resources on receive thread as well as tx thread,
> _you need_ locking. The only other way we can do avoid it is to separate
> the rx path interupts from ones on tx related resources; the last NAPI
> driver that did that was tulip; i think the e1000 for a short period in
> its life did the same as well. But that has been frowned on and people
> have evolved away from it.
If we went to finer grain locking it would also mean changes to all network
devices using the new locking model. My assumption is that we would use
something like the features flag to do the transition for backward compatibility.
Take this as a purely "what if" or "it would be nice if" kind of suggestion
not a requirement or some grand plan.
--
Stephen Hemminger <shemminger@...ux-foundation.org>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists