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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <jarkao2@...>
Cc: <herbert@...>, <netdev@...>, <denys@...>
Date: Sunday, August 17, 2008 - 6: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, 4:53 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., David Miller, (Sun Aug 17, 6:32 pm)
[PATCH take 2] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 5:27 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 6:23 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 6:15 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 6:28 am)
[PATCH] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 4:41 am)
Re: [PATCH] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 6:14 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Sun Aug 24, 7:26 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Sun Aug 24, 8:29 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Tue Aug 26, 8:24 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Tue Aug 26, 8:50 am)
RE: [PATCH take 2] pkt_sched: Fix qdisc_watchdog() vs. dev_d..., Duyck, Alexander H, (Mon Sep 15, 7:44 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Denys Fedoryshchenko, (Mon Aug 18, 2:08 am)