Re: [RFC] [PATCH] Don't run __qdisc_run() on a stopped TX queue
From: Jarek Poplawski <hidden>
Date: 2009-07-28 06:43:25
On Mon, Jul 27, 2009 at 09:21:07PM -0700, David Miller wrote:
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Tue, 28 Jul 2009 10:48:13 +0800quoted
On Mon, Jul 27, 2009 at 07:28:44PM -0700, David Miller wrote:quoted
There is a locking benefit even for non-default qdiscs. Instead of two choke points (qdisc lock and queue lock) there is now only one (qdisc lock) and consdiering the cost of things like setting up IOMMU mappings and hitting chip registers the qdisc lock is the shortest held of the two.But only one CPU can process a given qdisc at one time so I don't see why there is a second choke point if you use a single queue with a non-default qdisc.Good point, but this only suggests that we might want to undo that queue runner exclusivity state bit for this case especially when we know that we are feeding a multiqueue device.
I guess the main sacrifice of Herbert's idea is sch_multiq, and we could probably consider some compromise like doing qdisc_run (with qdisc_restart) a callback or only adding a "if default qdisc" check, depending on costs/gains. Jarek P.