Skip to content

Commit 28e09a2

Browse files
committed
locktorture: Forgive apparent unfairness if CPU hotplug
If CPU hotplug testing is enabled, a lock might appear to be maximally unfair just because one of the CPUs was offline almost all the time. This commit therefore forgives unfairness if CPU hotplug testing was enabled. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c0e1472 commit 28e09a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/locking/locktorture.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,8 @@ static void __torture_print_stats(char *page,
704704
page += sprintf(page,
705705
"%s: Total: %lld Max/Min: %ld/%ld %s Fail: %d %s\n",
706706
write ? "Writes" : "Reads ",
707-
sum, max, min, max / 2 > min ? "???" : "",
707+
sum, max, min,
708+
!onoff_interval && max / 2 > min ? "???" : "",
708709
fail, fail ? "!!!" : "");
709710
if (fail)
710711
atomic_inc(&cxt.n_lock_torture_errors);

0 commit comments

Comments
 (0)