]> 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)
commitfddf4d5ae3c14ad79a8cdb42970b906c87b33508
tree2b9182d7cf01814f2727c5241072b6d93884d57a
parent9a779357581fdff87a8774180ca883c1be3ab8ec
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