rhashtable: Disable automatic shrinking by default
Introduce a new bool automatic_shrinking to require the user to explicitly opt-in to automatic shrinking of tables. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ac833bddb5
commit
b5e2c150ac
@@ -367,7 +367,7 @@ static void rht_deferred_worker(struct work_struct *work)
|
||||
|
||||
if (rht_grow_above_75(ht, tbl))
|
||||
rhashtable_expand(ht);
|
||||
else if (rht_shrink_below_30(ht, tbl))
|
||||
else if (ht->p.automatic_shrinking && rht_shrink_below_30(ht, tbl))
|
||||
rhashtable_shrink(ht);
|
||||
|
||||
err = rhashtable_rehash_table(ht);
|
||||
|
Reference in New Issue
Block a user