[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1466029708-11359-7-git-send-email-paulmck@linux.vnet.ibm.com>
Date: Wed, 15 Jun 2016 15:28:27 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: mingo@...nel.org, jiangshanlai@...il.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
dvhart@...ux.intel.com, fweisbec@...il.com, oleg@...hat.com,
bobby.prani@...il.com,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 7/8] torture: Make waketorture kill test if no hotpluggable CPUs
This commit shuts down the kernel if a shutdown time was specified and
if there were no hotpluggable CPUs.
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
---
kernel/rcu/waketorture.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/waketorture.c b/kernel/rcu/waketorture.c
index 8568688607ac..f9843eb3f7b7 100644
--- a/kernel/rcu/waketorture.c
+++ b/kernel/rcu/waketorture.c
@@ -248,9 +248,15 @@ static int wake_torture_onoff(void *args)
if (cpu_is_hotpluggable(cpu))
onoff_cpu = cpu;
}
- pr_alert("%s" TORTURE_FLAG " wake_torture_onoff: onoff_cpu: %d\n", torture_type, onoff_cpu);
- if (onoff_cpu < 0)
+ if (onoff_cpu < 0) {
VERBOSE_TOROUT_STRING("wake_torture_onoff: no hotpluggable CPUs!");
+ if (shutdown_secs > 0) {
+ VERBOSE_TOROUT_STRING("wake_torture_onoff: Shutting down");
+ kernel_power_off();
+ VERBOSE_TOROUT_STRING("wake_torture_onoff: Survived kernel_power_off()?");
+ }
+ }
+ pr_alert("%s" TORTURE_FLAG " wake_torture_onoff: onoff_cpu: %d\n", torture_type, onoff_cpu);
while (!torture_must_stop() && onoff_cpu >= 0) {
if (!torture_offline(onoff_cpu,
&n_offline_attempts, &n_offline_successes,
--
2.5.2
Powered by blists - more mailing lists