From: Stephen Hemminger <shemminger@vyatta.com>
To: Dave Johnson <djohnson@starentnetworks.com>
Cc: "Akkipeddi, Srinivas" <sakkiped@starentnetworks.com>,
<netdev@vger.kernel.org>
Subject: Re: Deadlock in IPv6 code while garbage collection on the rwlock protecting the routing tree.
Date: Wed, 23 Dec 2009 10:13:09 -0800 [thread overview]
Message-ID: <20091223101309.08974d02@nehalam> (raw)
In-Reply-To: <19250.22271.876068.511246@zeus.eng.starentnetworks.com>
On Wed, 23 Dec 2009 12:44:31 -0500
Dave Johnson <djohnson@starentnetworks.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.
--
next prev parent reply other threads:[~2009-12-23 18:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 21:57 Deadlock in IPv6 code while garbage collection on the rwlock protecting the routing tree Akkipeddi, Srinivas
2009-12-22 22:36 ` Stephen Hemminger
2009-12-23 17:44 ` Dave Johnson
2009-12-23 18:13 ` Stephen Hemminger [this message]
2010-01-23 10:22 ` David Miller
2010-01-26 9:48 ` Jarek Poplawski
2010-01-26 10:35 ` Jarek Poplawski
2010-01-27 9:59 ` [PATCH] ipv6: Fix possible NULL dereference in icmp6_dst_alloc Jarek Poplawski
2010-01-27 10:14 ` David Miller
2010-01-27 10:34 ` Jarek Poplawski
2010-01-27 11:04 ` David Miller
2010-01-27 12:17 ` Jarek Poplawski
2010-01-27 12:23 ` David Miller
2010-01-27 12:43 ` Jarek Poplawski
2010-01-27 13:14 ` David Miller
2010-01-27 13:28 ` Jarek Poplawski
2010-01-27 12:35 ` Atis Elsts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091223101309.08974d02@nehalam \
--to=shemminger@vyatta.com \
--cc=djohnson@starentnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=sakkiped@starentnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox