From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: David Miller <davem@davemloft.net>,
kaber@trash.net, netdev@vger.kernel.org
Subject: Re: [PATCH] fib_trie: rescan if key is lost during dump
Date: Fri, 25 Jan 2008 08:13:15 -0800 [thread overview]
Message-ID: <20080125081315.467fad70@deepthought> (raw)
In-Reply-To: <20080125082300.GA2257@ff.dom.local>
On Fri, 25 Jan 2008 09:23:00 +0100
Jarek Poplawski <jarkao2@gmail.com> wrote:
> On 24-01-2008 22:51, Stephen Hemminger wrote:
> > Normally during a dump the key of the last dumped entry is used for
> > continuation, but since lock is dropped it might be lost. In that case
> > fallback to the old counter based N^2 behaviour. This means the dump will end up
> > skipping some routes which matches what FIB_HASH does.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> ...
> > @@ -1918,35 +1931,37 @@ static int fn_trie_dump(struct fib_table
> > struct leaf *l;
> > struct trie *t = (struct trie *) tb->tb_data;
> > t_key key = cb->args[2];
> > + int count = cb->args[3];
> >
> > rcu_read_lock();
>
> Sorry, but I lost the point: is rtnl held or not held here at the moment?
> If held, how this rcu_read_lock can help? Maybe some additional comment
> in the code?
>
> Thanks,
> Jarek P.
There are two different issues, (therefore two different patches).
1. How to handle multipart resume when the key was deleted during the
period the lock was dropped.
That is what this patch addresses.
2. RCU is unnecessary here because of use of RTNL. I am going to defer
on this till after #1. That patch is much less important.
--
Stephen Hemminger <stephen.hemminger@vyatta.com>
next prev parent reply other threads:[~2008-01-25 16:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080123224844.610730277@linux-foundation.org>
2008-01-23 22:48 ` [IPV4 1/5] fib_trie: more whitespace cleanup Stephen Hemminger
2008-01-24 4:37 ` David Miller
2008-01-23 22:48 ` [IPV4 2/5] fib_trie: remove unneeded NULL check Stephen Hemminger
2008-01-24 4:38 ` David Miller
2008-01-23 22:48 ` [IPV4 3/5] fib_trie: dump doesnt use RCU Stephen Hemminger
2008-01-24 4:50 ` David Miller
2008-01-24 6:41 ` Patrick McHardy
2008-01-24 6:43 ` David Miller
2008-01-24 6:47 ` Patrick McHardy
2008-01-24 7:26 ` David Miller
2008-01-24 6:45 ` Stephen Hemminger
2008-01-24 7:27 ` David Miller
2008-01-24 21:51 ` [PATCH] fib_trie: rescan if key is lost during dump Stephen Hemminger
2008-01-25 8:23 ` Jarek Poplawski
2008-01-25 16:13 ` Stephen Hemminger [this message]
2008-01-25 19:01 ` Jarek Poplawski
2008-02-01 0:45 ` David Miller
2008-01-23 22:48 ` [IPV4 4/5] fib_trie: version 0.410 Stephen Hemminger
2008-01-24 4:50 ` David Miller
2008-01-23 22:48 ` [IPV4 5/5] fib_semantics: sparse warnings Stephen Hemminger
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=20080125081315.467fad70@deepthought \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=jarkao2@gmail.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).