Skip to contentSkip to conversation

nohz: no softirq pending warnings for offline cpus

PATCH Applied Heiko Carstens 2 participants 2 messages Dec 11, 2008 – Dec 12, 2008 Nohz, dynticks support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nohz: no softirq pending warnings for offline cpus

From: Heiko Carstens <[email protected]>

After a cpu was taken down during cpu hotplug (read: disabled for interrupts) it still might have pending softirqs. However take_cpu_down makes sure that the idle task will run next instead of ksoftirqd on the taken down cpu. The idle task will call tick_nohz_stop_sched_tick which might warn about pending softirqs just before the cpu kills itself completely. However the pending softirqs on the dead cpu aren't a problem because they will be moved to an online cpu during CPU_DEAD handling.

So make sure we warn only for online cpus.

---
 kernel/time/tick-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/tick-sched.c +1 -1
Index: linux-2.6/kernel/time/tick-sched.c
===================================================================
@@ -247,7 +247,7 @@ void tick_nohz_stop_sched_tick(int inidl
 	if (need_resched())
 		goto end;
 
-	if (unlikely(local_softirq_pending())) {
+	if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
 		static int ratelimit;
 
 		if (ratelimit < 10) {
Applied
#1 lore raw
Quoted 10 lines · Heiko Carstens

From: Heiko Carstens <[email protected]>

After a cpu was taken down during cpu hotplug (read: disabled for interrupts) it still might have pending softirqs. However take_cpu_down makes sure that the idle task will run next instead of ksoftirqd on the taken down cpu. The idle task will call tick_nohz_stop_sched_tick which might warn about pending softirqs just before the cpu kills itself completely. However the pending softirqs on the dead cpu aren't a problem because they will be moved to an online cpu during CPU_DEAD handling.

Quoted 6 lines

So make sure we warn only for online cpus.

---
 kernel/time/tick-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

applied to tip/timers/nohz, thanks Heiko!

Ingo