Commit b5e2b10d authored by Yury Norov's avatar Yury Norov Committed by Greg Kroah-Hartman
Browse files

lib/find_bit_benchmark.c: avoid soft lockup in test_find_first_bit()

[ Upstream commit 4ba281d5 ]

test_find_first_bit() is intentionally sub-optimal, and may cause soft
lockup due to long time of run on some systems.  So decrease length of
bitmap to traverse to avoid lockup.

With the change below, time of test execution doesn't exceed 0.2 seconds
on my testing system.

Link: http://lkml.kernel.org/r/20180420171949.15710-1-ynorov@caviumnetworks.com


Fixes: 4441fca0 ("lib: test module for find_*_bit() functions")
Signed-off-by: default avatarYury Norov <ynorov@caviumnetworks.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4f970ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment