]> git.baikalelectronics.ru Git - kernel.git/commit
rhashtable-test: calculate max_entries value by default
authorPhil Sutter <phil@nwl.cc>
Fri, 20 Nov 2015 17:17:19 +0000 (18:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Nov 2015 17:36:08 +0000 (12:36 -0500)
commitef043223628f5cd4ebc3b51304f6f55361f63e19
tree2b9182d7cf01814f2727c5241072b6d93884d57a
parentc70e809ce9f69a579b09eb547fb17ac837146ab7
rhashtable-test: calculate max_entries value by default

A maximum table size of 64k entries is insufficient for the multiple
threads test even in default configuration (10 threads * 50000 objects =
500000 objects in total). Since we know how many objects will be
inserted, calculate the max size unless overridden by parameter.

Note that specifying the exact number of objects upon table init won't
suffice as that value is being rounded down to the next power of two -
anticipate this by rounding up to the next power of two in beforehand.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_rhashtable.c