Skip to contentSkip to conversation

rcu: stop spurious warnings from synchronize_sched_expedited

PATCH In review Hugh Dickins 2 participants 2 messages Feb 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 kernel/rcutree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcutree.c +1 -1
@@ -2014,7 +2014,7 @@ void synchronize_sched_expedited(void)
 	/* Note that atomic_inc_return() implies full memory barrier. */
 	firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
 	get_online_cpus();
-	WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
+	WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
 
 	/*
 	 * Each pass through the following loop attempts to force a
#1 lore raw
Quoted 3 lines · Hugh Dickins

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.

Good catch! Queued.

Thanx, Paul

Quoted 18 lines

---

 kernel/rcutree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcutree.c +1 -1
@@ -2014,7 +2014,7 @@ void synchronize_sched_expedited(void)
 	/* Note that atomic_inc_return() implies full memory barrier. */
 	firstsnap = snap = atomic_inc_return(&sync_sched_expedited_started);
 	get_online_cpus();
-	WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
+	WARN_ON_ONCE(cpu_is_offline(raw_smp_processor_id()));
 
 	/*
 	 * Each pass through the following loop attempts to force a