Re: [PATCH 20/31]: pkt_sched: Perform bulk of qdisc destruction in RCU.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Thursday, July 17, 2008 - 3:36 pm

From: Patrick McHardy <kaber@trash.net>
Date: Thu, 17 Jul 2008 15:48:22 +0200


What might make sense is to have a special Qdisc_root structure which
is simply:

struct Qdisc_root {
	struct Qdisc		qd;
	struct list_head	qdisc_list;
};

Everything about tree level synchronization would be type explicit.

Yes, as you say, the qdisc iteration would get slightly ugly.  But
that doesn't seem to be a huge deal.

But it seems a clean solution to the child qdisc visibility problem.

About u32_list, that thing definitely needs some spinlock.  The
consultation of that list, and refcount mods, only occur during config
operations.  So it's not like we have to grab this lock in the data
paths.

If we really want to sweep this problem under the rug, there is another
way.  Have the qdisc_destroy() RCU handler kick off a workqueue, and
grab the RTNL semaphore there during the final destruction calls. :-)

--
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:
Re: [PATCH 20/31]: pkt_sched: Perform bulk of qdisc destru ..., David Miller, (Thu Jul 17, 3:36 pm)