From: Thomas Graf <tgraf@suug.ch>
To: David Miller <davem@davemloft.net>
Cc: ying.xue@windriver.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] rhashtable: involve rhashtable_lookup_insert routine
Date: Mon, 5 Jan 2015 21:52:37 +0000 [thread overview]
Message-ID: <20150105215237.GC31637@casper.infradead.org> (raw)
In-Reply-To: <20150105.163018.658637009804208069.davem@davemloft.net>
On 01/05/15 at 04:30pm, David Miller wrote:
> From: Thomas Graf <tgraf@suug.ch>
> Date: Mon, 5 Jan 2015 13:05:14 +0000
>
> > On 01/05/15 at 07:33pm, Ying Xue wrote:
> >> Involve a new function called rhashtable_lookup_insert() which makes
> >> lookup and insertion atomic under bucket lock protection, helping us
> >> avoid to introduce an extra lock when we search and insert an object
> >> into hash table.
> >>
> >> Signed-off-by: Ying Xue <ying.xue@windriver.com>
> >> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> >
> > Thanks for putting this around so quickly and thanks for testing.
> > I think this looks good. You might be able to factor out some code
> > from rhashtable_insert() to avoid duplication so we reduce the risk
> > of fixing a bug for one function but not the other.
>
> Do you want Ying to do this factoring out now in a v3 of this patch
> or in a subsequent patch?
>
> I assume the former since you didn't give your ACK.
Ying,
I prefer it now if you don't mind. Basically I would like to see the
grow decision factored out at least:
/* Only grow the table if no resizing is currently in progress. */
if (ht->tbl != ht->future_tbl &&
ht->p.grow_decision && ht->p.grow_decision(ht, tbl->size))
schedule_delayed_work(&ht->run_work, 0);
prev parent reply other threads:[~2015-01-05 21:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 11:33 [PATCH net-next v2] rhashtable: involve rhashtable_lookup_insert routine Ying Xue
2015-01-05 13:05 ` Thomas Graf
2015-01-05 21:30 ` David Miller
2015-01-05 21:52 ` Thomas Graf [this message]
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=20150105215237.GC31637@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ying.xue@windriver.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;
as well as URLs for NNTP newsgroup(s).