diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2012-09-24 19:08:31 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-10-23 17:46:47 -0400 |
commit | 489832609a1ad7189d11715d8cefb457d90182c5 (patch) | |
tree | b4ba989f1852cdda9fac8c4671c21522b730c69a /kernel/rcutorture.c | |
parent | abfd6e58aed4f89fd69b9b17bc4b4527efe3a645 (diff) |
rcu: Make rcutorture give diagnostics if CPU offline fails
This commit causes rcutorture to print the errno if cpu_down() fails
when the rcutorture "verbose" module parameter is specified.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutorture.c')
-rw-r--r-- | kernel/rcutorture.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index aaa7b9f3532a..9900f560f1bd 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -1502,6 +1502,7 @@ rcu_torture_onoff(void *arg) | |||
1502 | unsigned long delta; | 1502 | unsigned long delta; |
1503 | int maxcpu = -1; | 1503 | int maxcpu = -1; |
1504 | DEFINE_RCU_RANDOM(rand); | 1504 | DEFINE_RCU_RANDOM(rand); |
1505 | int ret; | ||
1505 | unsigned long starttime; | 1506 | unsigned long starttime; |
1506 | 1507 | ||
1507 | VERBOSE_PRINTK_STRING("rcu_torture_onoff task started"); | 1508 | VERBOSE_PRINTK_STRING("rcu_torture_onoff task started"); |
@@ -1522,7 +1523,13 @@ rcu_torture_onoff(void *arg) | |||
1522 | torture_type, cpu); | 1523 | torture_type, cpu); |
1523 | starttime = jiffies; | 1524 | starttime = jiffies; |
1524 | n_offline_attempts++; | 1525 | n_offline_attempts++; |
1525 | if (cpu_down(cpu) == 0) { | 1526 | ret = cpu_down(cpu); |
1527 | if (ret) { | ||
1528 | if (verbose) | ||
1529 | pr_alert("%s" TORTURE_FLAG | ||
1530 | "rcu_torture_onoff task: offline %d failed: errno %d\n", | ||
1531 | torture_type, cpu, ret); | ||
1532 | } else { | ||
1526 | if (verbose) | 1533 | if (verbose) |
1527 | pr_alert("%s" TORTURE_FLAG | 1534 | pr_alert("%s" TORTURE_FLAG |
1528 | "rcu_torture_onoff task: offlined %d\n", | 1535 | "rcu_torture_onoff task: offlined %d\n", |