Thread (35 messages) 35 messages, 6 authors, 2015-03-13

Re: rhashtable: Move hash_rnd into bucket_table

From: David Miller <hidden>
Date: 2015-03-09 19:55:44

From: David Miller <redacted>
Date: Mon, 09 Mar 2015 15:51:37 -0400 (EDT)
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 9 Mar 2015 20:58:33 +1100
quoted
Currently hash_rnd is a parameter that users can set.  However,
no existing users set this parameter.  It is also something that
people are unlikely to want to set directly since it's just a
random number.

In preparation for allowing the reseeding/rehashing of rhashtable,
this patch moves hash_rnd into bucket_table so that it's now an
internal state rather than a parameter.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thomas is right, you're going to have to move the hash_rnd initialization
to where we allocate the bucket tables, otherwise the first shrink/expand
will set it to zero.
My bad, Daniel pointed this out, not Thomas.

Sorry about that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help