mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nohz: no softirq pending warnings for offline cpus
@ 2008-12-11 16:04 Heiko Carstens
  2008-12-12  6:27 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2008-12-11 16:04 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, Andrew Morton, Rusty Russell
  Cc: linux-kernel, Martin Schwidefsky

From: Heiko Carstens <heiko.carstens@de.ibm.com>

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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 kernel/time/tick-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/kernel/time/tick-sched.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-sched.c
+++ 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) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nohz: no softirq pending warnings for offline cpus
  2008-12-11 16:04 [PATCH] nohz: no softirq pending warnings for offline cpus Heiko Carstens
@ 2008-12-12  6:27 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-12  6:27 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Thomas Gleixner, Andrew Morton, Rusty Russell, linux-kernel,
	Martin Schwidefsky


* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> 
> 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.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  kernel/time/tick-sched.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to tip/timers/nohz, thanks Heiko!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-12  6:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11 16:04 [PATCH] nohz: no softirq pending warnings for offline cpus Heiko Carstens
2008-12-12  6:27 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®