diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-02-25 18:31:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-28 00:06:02 +0300 |
commit | 4c4b52d9b2df45e8216d3e30b5452e4a364d2cac (patch) | |
tree | 3e4d9c6941729846c3c55c7f256197321311b3aa /lib/test_rhashtable.c | |
parent | 8331de75cb13fc907ceba78e698c42150e61dda9 (diff) | |
download | linux-4c4b52d9b2df45e8216d3e30b5452e4a364d2cac.tar.xz |
rhashtable: remove indirection for grow/shrink decision functions
Currently, all real users of rhashtable default their grow and shrink
decision functions to rht_grow_above_75() and rht_shrink_below_30(),
so that there's currently no need to have this explicitly selectable.
It can/should be generic and private inside rhashtable until a real
use case pops up. Since we can make this private, we'll save us this
additional indirection layer and can improve insertion/deletion time
as well.
Reference: http://patchwork.ozlabs.org/patch/443040/
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/test_rhashtable.c')
-rw-r--r-- | lib/test_rhashtable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index f9e9d734446a..67c7593d1dd6 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -201,6 +201,7 @@ static int __init test_rht_init(void) .key_offset = offsetof(struct test_obj, value), .key_len = sizeof(int), .hashfn = jhash, + .max_shift = 1, /* we expand/shrink manually here */ .nulls_base = (3U << RHT_BASE_SHIFT), }; int err; |