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: <netdev@...>
Date: Tuesday, August 12, 2008 - 1:40 am

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Tue, 12 Aug 2008 05:20:48 +0000


Those comments are out of date and I need to update them.
In fact this whole loop is now largely pointless.

The rcu_dereference() on dev_queue->qdisc happens before the
QDISC_RUNNING bit is set.

We no longer resample the qdisc under any kind of lock.  Because we no
longer have a top-level lock that synchronizes the setting of
dev_queue->qdisc

Rather, the lock we use for calling ->enqueue() and ->dequeue() is
inside of the root qdisc itself.

That's why all of the real destruction has to occur in the RCU handler.

Anyways, this is part of the problem I think is causing the crash the
Intel folks are triggering.

We sample the qdisc in dev_queue_xmit() or wherever, then we attach
that to the per-cpu ->output_queue to process it via qdisc_run()
in the software interrupt handler.

The RCU quiesce period extends to the next scheduling point and this
is enough if we do normal direct softirq processing of this qdisc.

But if it gets postponed into ksoftirqd... the RCU will pass too
early.

I'm still thinking about how to fix this without avoiding RCU
and without adding new synchronization primitives.
--
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, (Tue Aug 12, 1:40 am)
[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)