From: Nick Piggin <npiggin@suse.de>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, robert.olsson@its.uu.se,
Paul McKenney <paulmck@us.ibm.com>
Subject: Re: [RFC PATCH]: Dynamically sized routing cache hash table.
Date: Tue, 6 Mar 2007 10:41:49 +0100 [thread overview]
Message-ID: <20070306094149.GC12365@wotan.suse.de> (raw)
In-Reply-To: <200703061023.44722.dada1@cosmosbay.com>
On Tue, Mar 06, 2007 at 10:23:44AM +0100, Eric Dumazet wrote:
> On Tuesday 06 March 2007 10:11, Nick Piggin wrote:
>
> > Cool! I have some fixes for the rcu barrier issues, with some C-style
> > comments and questions :)
> >
> > I was going to send you a fix first for the rcu barriers, then a
> > second to convert the read-side to a barrier-less one that I described,
> > however considering that your patch is a WIP in progress anyway, I
> > won't worry too much about the normal protocol.
> >
> > I _think_ my reasoning regarding the rcu barriers and grace periods
> > is correct. I'll keep thinking about it though. (Paul cc'ed).
> >
> > I'm not so familiar with this code, so I have sprinkled around a lot
> > of comments that could be pure crap ;) They are mainly just to help
> > you ensure that you cover all bases... compile tested only at this
> > stage.
>
> I think we missed :
>
> +static void rt_hash_resize_work(struct work_struct *work)
>
> +
> + *head = rth->u.dst.rt_next;
> +
> + hash = rt_hashfn(rt_hash,
> + rth->fl.fl4_dst,
> + rth->fl.fl4_src,
> + iface);
> + rth->u.dst.rt_next = rt_hash->table[hash].chain;
> + rt_hash->table[hash].chain = rth;
>
> This really needs some ..._del_rcu()/..._add_rcu()_ ... primitives, no ?
> Or else a reader might be very confused...
I'm not sure... this code really depends on the hash table management,
rather than the management of the hash tables, if you understand me ;)
>From what I can _see_, this is similar to how rt_intern_hash does it.
I don't know exactly why rt_intern_hash can get away without using
rcu_assign_pointer in some cases, however:
Note that we don't need an rcu_assign_pointer for this, because the
memory operations that initialized the entry have already been ordered
when it was first inserted.
next prev parent reply other threads:[~2007-03-06 9:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 4:26 [RFC PATCH]: Dynamically sized routing cache hash table David Miller
2007-03-06 7:14 ` Eric Dumazet
2007-03-06 7:23 ` David Miller
2007-03-06 7:58 ` Eric Dumazet
2007-03-06 9:05 ` David Miller
2007-03-06 10:33 ` [PATCH] NET : Optimizes inet_getpeer() Eric Dumazet
2007-03-07 4:23 ` David Miller
2007-03-06 13:42 ` [RFC PATCH]: Dynamically sized routing cache hash table Robert Olsson
2007-03-06 14:18 ` Eric Dumazet
2007-03-06 17:05 ` Robert Olsson
2007-03-06 17:20 ` Eric Dumazet
2007-03-06 18:55 ` Robert Olsson
2007-03-06 9:11 ` Nick Piggin
2007-03-06 9:17 ` David Miller
2007-03-06 9:22 ` Nick Piggin
2007-03-06 9:23 ` Eric Dumazet
2007-03-06 9:41 ` Nick Piggin [this message]
2007-03-06 13:26 ` Robert Olsson
2007-03-06 22:20 ` David Miller
2007-03-08 6:26 ` Nick Piggin
2007-03-08 13:35 ` Robert Olsson
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=20070306094149.GC12365@wotan.suse.de \
--to=npiggin@suse.de \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=paulmck@us.ibm.com \
--cc=robert.olsson@its.uu.se \
/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).