aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2012-02-17 16:20:31 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-02-21 18:33:34 -0500
commit1cc85961e214773cb7d7f2ccbe3bc644dd466df0 (patch)
tree1ded62f9f4c72a00b5cca2396919ee4c2ec547ec
parent696a02cc16b182dd78b1f395ae336f449cc90f11 (diff)
rcu: Stop spurious warnings from synchronize_sched_expedited
synchronize_sched_expedited() is spamming CONFIG_DEBUG_PREEMPT=y users with an unintended warning from the cpu_is_offline() check: use raw_smp_processor_id() instead of smp_processor_id() there. Because the warning is under a get_online_cpus(), it is not possible for any CPUs to go offline, though it is quite possible that the task might migrate between the raw_smp_processor_id() and the check of cpu_is_offline(). This is not a problem because the task cannot migrate from an offline CPU to an online one or vice versa. The point of the check is to verify that synchronize_sched_expedited() is not called from an offline CPU, for example, from a CPU_DYING notifier, or, more important, from an outgoing CPU making its way from its CPU_DYING notifiers to the idle loop. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--kernel/rcutree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index eacc10b03531..1050d6d3922c 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -2014,7 +2014,7 @@ void synchronize_sched_expedited(void)
2014 /* Note that atomic_inc_return() implies full memory barrier. */ 2014 /* Note that atomic_inc_return() implies full memory barrier. */
2015 firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started); 2015 firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
2016 get_online_cpus(); 2016 get_online_cpus();
2017 WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); 2017 WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
2018 2018
2019 /* 2019 /*
2020 * Each pass through the following loop attempts to force a 2020 * Each pass through the following loop attempts to force a