Subject: Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

From: Jarek Poplawski <[email-masked]>
Date: Wed, 13 Aug 2008 07:31:40 +0000

On Wed, Aug 13, 2008 at 06:53:02AM +0000, Jarek Poplawski wrote:
...
> Thats why I still think a "common" RCU with rcu_dereference() (from
> dev_queue pointer)

I hope nobody read this literally: I mean using dev_queue pointer
for dereferencing Qdisc pointer...

> in net_tx_action() should be enough: after
> synchronize_rcu() in dev_deactivate() we are sure any qdisc_run(),
> from dev_queue_xmit() or net_tx_action() can only see and lock
> noop_qdisc. Any activities on qdisc_sleeping can't happen so no
> need to wait for this. There could be some skbs enqueued just before
> synchronize, and they could be ->reset() and ->destroy() just after,
> even without rcu_call().

BTW, this all is easy to verify: simply adding debugging waiting loops
with checking the state of qdisc_sleeping after synchronize_rcu.

Jarek P.