From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
Patrick McHardy <kaber@trash.net>,
Josh Triplett <josh@joshtriplett.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
netdev@vger.kernel.org
Subject: Re: [v3 PATCH 9/9] rhashtable: Add immediate rehash during insertion
Date: Mon, 23 Mar 2015 16:50:33 +0000 [thread overview]
Message-ID: <20150323165033.GD20752@casper.infradead.org> (raw)
In-Reply-To: <E1Ya2kO-0004JD-Om@gondolin.me.apana.org.au>
On 03/24/15 at 12:50am, Herbert Xu wrote:
> @@ -116,6 +117,7 @@ struct rhashtable_params {
> unsigned int max_size;
> unsigned int min_size;
> u32 nulls_base;
> + bool insecure_elasticity;
> size_t locks_mul;
> rht_hashfn_t hashfn;
> rht_obj_hashfn_t obj_hashfn;
First of all, love the naming of this variable ;-)
> @@ -127,6 +129,7 @@ struct rhashtable_params {
> * @tbl: Bucket table
> * @nelems: Number of elements in table
> * @key_len: Key length for hashfn
> + * @elasticity: Maximum chain length before rehash
> * @p: Configuration parameters
> * @run_work: Deferred worker to expand/shrink asynchronously
> * @mutex: Mutex to protect current/future table swapping
2nd: Seems like you rely on an underflow to allow to "disable"
the elasticity limit. Fair enough, but it would be great to
have the limit configurable as well.
How about making elasticity a signed int, default to 16 if user
specifies 0 and require it to be set to -1 (through a define)
to actually disable the behaviour. That would avoid requiring
two variables to implement this and makes the limit configurable
at the same time.
Otherwise this looks good to me.
next prev parent reply other threads:[~2015-03-23 16:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 13:49 [v3 PATCH 0/9] rhashtable: Multiple rehashing Herbert Xu
2015-03-23 13:50 ` [v3 PATCH 1/9] rhashtable: Add barrier to ensure we see new tables in walker Herbert Xu
2015-03-23 13:50 ` [v3 PATCH 2/9] rhashtable: Eliminate unnecessary branch in rht_key_hashfn Herbert Xu
2015-03-23 13:58 ` Thomas Graf
2015-03-23 13:50 ` [v3 PATCH 3/9] rhashtable: Allow hashfn to be unset Herbert Xu
2015-03-23 15:36 ` Thomas Graf
2015-03-23 13:50 ` [v3 PATCH 4/9] netlink: Use default rhashtable hashfn Herbert Xu
2015-03-23 13:50 ` [v3 PATCH 5/9] tipc: " Herbert Xu
2015-03-23 13:50 ` [v3 PATCH 6/9] rhashtable: Shrink to fit Herbert Xu
2015-03-23 15:38 ` Thomas Graf
2015-03-23 13:50 ` [v3 PATCH 7/9] rhashtable: Add multiple rehash support Herbert Xu
2015-03-23 16:37 ` Thomas Graf
2015-03-23 13:50 ` [v3 PATCH 8/9] rhashtable: Allow GFP_ATOMIC bucket table allocation Herbert Xu
2015-03-23 16:38 ` Thomas Graf
2015-03-23 13:50 ` [v3 PATCH 9/9] rhashtable: Add immediate rehash during insertion Herbert Xu
2015-03-23 16:50 ` Thomas Graf [this message]
2015-03-23 16:54 ` David Laight
2015-03-23 21:44 ` Herbert Xu
2015-03-23 21:56 ` Thomas Graf
2015-03-23 22:15 ` Herbert Xu
2015-03-24 2:09 ` [v3 PATCH 0/9] rhashtable: Multiple rehashing David Miller
2015-03-24 2:37 ` Herbert Xu
2015-03-24 18:57 ` 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=20150323165033.GD20752@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=josh@joshtriplett.org \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.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).