diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-01-31 05:37:04 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-02-21 00:59:59 +0100 |
commit | 28e09a2e48486ce8ff0a72e21570d59b1243b308 (patch) | |
tree | 1eaa21255f337b0c4eeb6435f97d523711165e27 /kernel/locking/locktorture.c | |
parent | locktorture: Use private random-number generators (diff) | |
download | linux-28e09a2e48486ce8ff0a72e21570d59b1243b308.tar.xz linux-28e09a2e48486ce8ff0a72e21570d59b1243b308.zip |
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 <paulmck@kernel.org>
Diffstat (limited to 'kernel/locking/locktorture.c')
-rw-r--r-- | kernel/locking/locktorture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index 5baf904e8f39..5efbfc68ce99 100644 --- a/kernel/locking/locktorture.c +++ b/kernel/locking/locktorture.c @@ -704,7 +704,8 @@ static void __torture_print_stats(char *page, page += sprintf(page, "%s: Total: %lld Max/Min: %ld/%ld %s Fail: %d %s\n", write ? "Writes" : "Reads ", - sum, max, min, max / 2 > min ? "???" : "", + sum, max, min, + !onoff_interval && max / 2 > min ? "???" : "", fail, fail ? "!!!" : ""); if (fail) atomic_inc(&cxt.n_lock_torture_errors); |