Subject: Re: [PATCH 1/2] pkt_sched: Fix gen_estimator locks

From: Jarek Poplawski <[email-masked]>
Date: Wed, 27 Aug 2008 10:44:58 +0000

On Wed, Aug 27, 2008 at 02:57:47AM -0700, David Miller wrote:
> From: Herbert Xu <[email-masked]>
> Date: Wed, 27 Aug 2008 19:55:49 +1000
> 
> > What I mean is a pointer like sch->root_qdisc, and we would provide
> > that to qdisc_create as a parameter in place of dev_queue (and
> > NULL for root qdiscs themselves).  So as long as we assign it at
> > the top of this function it would be available here too.
> 
> Ok, that makes sense.

Yes, it should be simpler. (We can probably consider a pointer to
itself instead of NULL for root qdiscs, to skip testing for NULL e.g.
while getting a lock.) On the other hand, we lose with this the
possibility to easily determine which dev_queue is "the owner" of the
qdisc, or if some dev_queue contains a clone only.

Jarek P.