[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091223101309.08974d02@nehalam>
Date: Wed, 23 Dec 2009 10:13:09 -0800
From: Stephen Hemminger <shemminger@...tta.com>
To: Dave Johnson <djohnson@...rentnetworks.com>
Cc: "Akkipeddi, Srinivas" <sakkiped@...rentnetworks.com>,
<netdev@...r.kernel.org>
Subject: Re: Deadlock in IPv6 code while garbage collection on the rwlock
protecting the routing tree.
On Wed, 23 Dec 2009 12:44:31 -0500
Dave Johnson <djohnson@...rentnetworks.com> wrote:
> I don't think that would help. You would still have a writer
> contained within a reader issue. This would also likely involve quite
> a bit of copying given the amount of data the existing rwlock is
> protecting and how frequent write locks may be needed.
With RCU, you can safely acquire a spinlock inside rcu_read_lock
section. The only issue is that the entry being modified might already
be in process of being deleted (ie. modifying a dead route).
Probably simpler to just get rid of rwlock entirely, go with a spinlock
for now. Reader/writer locks are slower than spin locks and even if
lock is highly read contended, it is not held for long.
IPV6 routing table is using much simpler algorithms on the assumption
that IPV6 was going to solve the CIDR address explosion problem. That
assumption will probably not hold up, and having a trie (TRASH) version
of IPV6 routing table with RCU would be a good research project for
some graduate student.
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists