From: Daniel Borkmann <daniel@iogearbox.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: davem@davemloft.net, pablo@netfilter.org, johunt@akamai.com,
kaber@trash.net, netdev@vger.kernel.org,
Ying Xue <ying.xue@windriver.com>
Subject: Re: [PATCH net 1/2] rhashtable: unconditionally grow when max_shift is not specified
Date: Wed, 25 Feb 2015 17:36:38 +0100 [thread overview]
Message-ID: <54EDFA16.20308@iogearbox.net> (raw)
In-Reply-To: <20150225162846.GA13107@casper.infradead.org>
On 02/25/2015 05:28 PM, Thomas Graf wrote:
> On 02/25/15 at 04:31pm, Daniel Borkmann wrote:
>> diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c
>> index 58b9953..f9e9d73 100644
>> --- a/lib/test_rhashtable.c
>> +++ b/lib/test_rhashtable.c
>> @@ -202,8 +202,6 @@ static int __init test_rht_init(void)
>> .key_len = sizeof(int),
>> .hashfn = jhash,
>> .nulls_base = (3U << RHT_BASE_SHIFT),
>> - .grow_decision = rht_grow_above_75,
>> - .shrink_decision = rht_shrink_below_30,
>> };
>> int err;
>
> I assume you wanted this chunk in patch 2.
No, it's in this chunk on purpose. ;)
I've tried to explain it here in the commit message:
Given that the test case verifies shrinks/expands manually, we also
must remove pointer to the helper functions to explicitly avoid
parallel resizing on insertions/deletions. test_bucket_stats() and
test_rht_lookup() could also be wrapped around rhashtable mutex to
explicitly synchronize a walk from resizing, but I think that defeats
the actual test case which intended to have explicit test steps,
i.e. 1) inserts, 2) expands, 3) shrinks, 4) deletions, with object
verification after each stage.
If we leave it as is, the test case may fail due to a resize run
competing in parallel with the walk (as it's not using Herbert's
API) - I assume the purpose of the test case was to test expands
and shrinks manually in stages and walk/verify the table after
each step.
Cheers,
Daniel
next prev parent reply other threads:[~2015-02-25 16:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 15:31 [PATCH net 0/2] rhashtable updates Daniel Borkmann
2015-02-25 15:31 ` [PATCH net 1/2] rhashtable: unconditionally grow when max_shift is not specified Daniel Borkmann
2015-02-25 16:28 ` Thomas Graf
2015-02-25 16:36 ` Daniel Borkmann [this message]
2015-02-25 16:44 ` Daniel Borkmann
2015-02-25 17:09 ` Thomas Graf
2015-02-25 15:31 ` [PATCH net 2/2] rhashtable: remove indirection for grow/shrink decision functions Daniel Borkmann
2015-02-25 15:41 ` David Laight
2015-02-25 15:46 ` Daniel Borkmann
2015-02-25 15:51 ` David Laight
2015-02-25 16:14 ` Daniel Borkmann
2015-02-25 17:41 ` Eric Dumazet
2015-02-25 17:49 ` David Laight
2015-02-25 18:15 ` Eric Dumazet
2015-02-25 18:56 ` Daniel Borkmann
2015-02-25 19:52 ` Eric Dumazet
2015-02-25 20:10 ` Patrick McHardy
2015-02-26 10:02 ` tgraf
2015-02-27 22:30 ` David Miller
2015-02-28 0:48 ` Patrick McHardy
2015-02-28 1:35 ` David Miller
2015-02-26 14:18 ` David Laight
2015-03-11 6:42 ` Herbert Xu
2015-03-12 16:57 ` Thomas Graf
2015-03-13 7:06 ` Herbert Xu
2015-02-25 17:23 ` Thomas Graf
2015-02-27 21:06 ` [PATCH net 0/2] rhashtable updates David Miller
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=54EDFA16.20308@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=johunt@akamai.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=tgraf@suug.ch \
--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).