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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Sunday, August 17, 2008 - 3:32 pm

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Mon, 18 Aug 2008 00:22:07 +0200


It _might_ be ok once we are done sorting out the synchronization
sequence dev_deactivate() uses.  But we aren't there yet.


I can't even follow your flurry of patches, and neither can the
tester :-)  I deleted the entire thread to be honest, hoping you
would come back with a simple analysis once you've worked things
out with the tester.

What is the real problem besides the correct notify_and_destroy()
issue you discovered?

The locking we have now is very simple:

1) Only under RTNL can qdisc roots change.

2) Therefore, sch_tree_lock() and tcf_tree_lock() are fully valid
   and lock the entire qdisc tree state, if and only if used under
   RTNL lock.

3) Before modifying a qdisc, we dev_deactivate(), which synchronizes
   with asynchronous TX/RX packet handling contexts.

4) The qdisc root and all children are protected by the root qdiscs
   lock, which is taken when asynchonous contexts need to blocked
   while modifying some root or inner qdisc's state.

Yes, of course, if you apply a hammer and add a bit lock at the
top of all of this it will fix whatever bugs remain, but as you
know I don't think that's the solution.

The only substance I've seen is that you've found a violation of #4 in
notify_and_destroy(), so great let's test the fix for that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock()., Jarek Poplawski, (Mon Aug 11, 1:53 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., David Miller, (Sun Aug 17, 3:32 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., Denys Fedoryshchenko, (Sun Aug 17, 11:08 pm)
[PATCH] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 1:41 am)
[PATCH take 2] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 2:27 am)
Re: [PATCH] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 3:14 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 3:15 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 3:23 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 3:28 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., Stephen Hemminger, (Sun Aug 24, 4:26 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., Stephen Hemminger, (Sun Aug 24, 5:29 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., Stephen Hemminger, (Tue Aug 26, 5:24 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_l ..., Stephen Hemminger, (Tue Aug 26, 5:50 am)
RE: [PATCH take 2] pkt_sched: Fix qdisc_watchdog() vs. dev ..., Duyck, Alexander H, (Mon Sep 15, 4:44 pm)