summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-11-01 08:57:21 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-12-11 10:31:42 -0800
commit0989cb46783188ea7346ba6490be0046b9b7a725 (patch)
treeab3ca7e6099efd9ca814e9202a679388f36ecc90 /kernel/rcutree.c
parent4145fa7fbee3ec1e61c52825b146192885d9759f (diff)
downloadop-kernel-dev-0989cb46783188ea7346ba6490be0046b9b7a725.zip
op-kernel-dev-0989cb46783188ea7346ba6490be0046b9b7a725.tar.gz
rcu: Add more information to the wrong-idle-task complaint
The current code just complains if the current task is not the idle task. This commit therefore adds printing of the identity of the idle task. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 06e40dd..9888a0ad 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -356,10 +356,14 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
}
trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
if (!idle_cpu(smp_processor_id())) {
- WARN_ON_ONCE(1); /* must be idle task! */
+ struct task_struct *idle = idle_task(smp_processor_id());
+
trace_rcu_dyntick("Error on entry: not idle task",
oldval, rdtp->dynticks_nesting);
ftrace_dump(DUMP_ALL);
+ WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s",
+ current->pid, current->comm,
+ idle->pid, idle->comm); /* must be idle task! */
}
/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
smp_mb__before_atomic_inc(); /* See above. */
@@ -445,10 +449,14 @@ static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks) & 0x1));
trace_rcu_dyntick("End", oldval, rdtp->dynticks_nesting);
if (!idle_cpu(smp_processor_id())) {
- WARN_ON_ONCE(1); /* must be idle task! */
+ struct task_struct *idle = idle_task(smp_processor_id());
+
trace_rcu_dyntick("Error on exit: not idle task",
oldval, rdtp->dynticks_nesting);
ftrace_dump(DUMP_ALL);
+ WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s",
+ current->pid, current->comm,
+ idle->pid, idle->comm); /* must be idle task! */
}
}
OpenPOWER on IntegriCloud