aboutsummaryrefslogtreecommitdiffstats
path: root/lib/find_bit_benchmark.c
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2018-05-26 13:45:49 +0200
committerRadim Krčmář <rkrcmar@redhat.com>2018-05-26 13:45:49 +0200
commitf33ecec9bb5199c5a4dd296af604f70273d2636e (patch)
treeba12665fe8f7952a64013bef9125bfac27ff1fda /lib/find_bit_benchmark.c
parentKVM: x86: Expose CLDEMOTE CPU feature to guest VM (diff)
parentx86/Hyper-V/hv_apic: Build the Hyper-V APIC conditionally (diff)
downloadlinux-dev-f33ecec9bb5199c5a4dd296af604f70273d2636e.tar.xz
linux-dev-f33ecec9bb5199c5a4dd296af604f70273d2636e.zip
Merge branch 'x86/hyperv' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
To resolve conflicts with the PV TLB flush series.
Diffstat (limited to 'lib/find_bit_benchmark.c')
-rw-r--r--lib/find_bit_benchmark.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/find_bit_benchmark.c b/lib/find_bit_benchmark.c
index 5985a25e6cbc..5367ffa5c18f 100644
--- a/lib/find_bit_benchmark.c
+++ b/lib/find_bit_benchmark.c
@@ -132,7 +132,12 @@ static int __init find_bit_test(void)
test_find_next_bit(bitmap, BITMAP_LEN);
test_find_next_zero_bit(bitmap, BITMAP_LEN);
test_find_last_bit(bitmap, BITMAP_LEN);
- test_find_first_bit(bitmap, BITMAP_LEN);
+
+ /*
+ * test_find_first_bit() may take some time, so
+ * traverse only part of bitmap to avoid soft lockup.
+ */
+ test_find_first_bit(bitmap, BITMAP_LEN / 10);
test_find_next_and_bit(bitmap, bitmap2, BITMAP_LEN);
pr_err("\nStart testing find_bit() with sparse bitmap\n");