Thread (23 messages) 23 messages, 6 authors, 2017-04-28

Re: [PATCH net-next] rhashtable: remove insecure_max_entries param

From: Florian Westphal <fw@strlen.de>
Date: 2017-04-25 11:24:06

Herbert Xu [off-list ref] wrote:
Florian Westphal [off-list ref] wrote:
quoted
no users in the tree, insecure_max_entries is always set to
ht->p.max_size * 2 in rhtashtable_init().

Replace only spot that uses it with a ht->p.max_size check.
I'd suggest that as this needs to be computed every time we insert
an element that you keep the value in struct rhashtable, but as an
internal value as opposed to a paramter that is set by the user.
What extra cost?

The only change is that ht->nelems has to be right-shifted by one,
I don't think that warrants extra space in struct rhashtable, its
already way too large (I think we can reduce its size further).

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help