diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-02-20 02:53:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-21 01:38:09 +0300 |
commit | eb6d1abf1bd8bf1beb45b5401c8324bdb8f893c4 (patch) | |
tree | 75f3fee2718ab7194dca0153ff765484b412401a /lib/test_rhashtable.c | |
parent | 342100d937ed6e5faf1e7ee7dcd7b3935fec8877 (diff) | |
download | linux-eb6d1abf1bd8bf1beb45b5401c8324bdb8f893c4.tar.xz |
rhashtable: better high order allocation attempts
When trying to allocate future tables via bucket_table_alloc(), it seems
overkill on large table shifts that we probe for kzalloc() unconditionally
first, as it's likely to fail.
Only probe with kzalloc() for more reasonable table sizes and use vzalloc()
either as a fallback on failure or directly in case of large table sizes.
Fixes: 7e1e77636e36 ("lib: Resizable, Scalable, Concurrent Hash Table")
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')
0 files changed, 0 insertions, 0 deletions