Re: [PATCH take 2] pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
From: David Miller <davem@davemloft.net>
Date: 2008-09-11 11:43:01
From: David Miller <davem@davemloft.net>
Date: 2008-09-11 11:43:01
From: Herbert Xu <herbert@gondor.apana.org.au> Date: Thu, 11 Sep 2008 21:00:35 +1000
On Thu, Sep 11, 2008 at 03:49:55AM -0700, David Miller wrote:quoted
Well some kind of check has to be there. I _did_ remove it during my initial implementation, and that turned into a reported performance regression.I see. How about looking at the queue that the head-of-qdisc packet maps to? That should be fairly cheap to compute.
This gets us back to the whole qdisc->ops->peek() discussion :) And we don't have the qdisc lock here, taking it is undesirable, and if we do take it we have to transfer that lock down into __qdisc_run() which means adjusting all the other __qdisc_run() callers. It's very clumsy at best. I therefore don't think it's wise peeking into the qdisc here. But I do realize we have to do something about this, hmmm...