All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH stable] tick/nohz: Prevent bogus softirq pending warning
@ 2018-08-30 15:05 Thomas Gleixner
  2018-08-30 15:12 ` Frederic Weisbecker
  2018-09-12 13:56 ` Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Gleixner @ 2018-08-30 15:05 UTC (permalink / raw
  To: John Crispin
  Cc: Frederic Weisbecker, LKML, Ingo Molnar, Anna-Maria Gleixner,
	Greg Kroah-Hartman, stable

Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an
inline softirq") got backported to stable trees and now causes the NOHZ
softirq pending warning to trigger. It's not an upstream issue as the NOHZ
update logic has been changed there.

The problem is when a softirq disabled section gets interrupted and on
return from interrupt the tick/nohz state is evaluated, which then can
observe pending soft interrupts. These soft interrupts are legitimately
pending because they cannot be processed as long as soft interrupts are
disabled and the interrupted code will correctly process them when soft
interrupts are reenabled.

Add a check for softirqs disabled to the pending check to prevent the
warning.

Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reported-by: John Crispin <john@phrozen.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: John Crispin <john@phrozen.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
---
 kernel/time/tick-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -888,7 +888,7 @@ static bool can_stop_idle_tick(int cpu,
 	if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
 		static int ratelimit;
 
-		if (ratelimit < 10 &&
+		if (ratelimit < 10 && !in_softirq() &&
 		    (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) {
 			pr_warn("NOHZ: local_softirq_pending %02x\n",
 				(unsigned int) local_softirq_pending());

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

* Re: [PATCH stable] tick/nohz: Prevent bogus softirq pending warning
  2018-08-30 15:05 [PATCH stable] tick/nohz: Prevent bogus softirq pending warning Thomas Gleixner
@ 2018-08-30 15:12 ` Frederic Weisbecker
  2018-09-12 13:56 ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Frederic Weisbecker @ 2018-08-30 15:12 UTC (permalink / raw
  To: Thomas Gleixner
  Cc: John Crispin, LKML, Ingo Molnar, Anna-Maria Gleixner,
	Greg Kroah-Hartman, stable

On Thu, Aug 30, 2018 at 05:05:19PM +0200, Thomas Gleixner wrote:
> Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an
> inline softirq") got backported to stable trees and now causes the NOHZ
> softirq pending warning to trigger. It's not an upstream issue as the NOHZ
> update logic has been changed there.
> 
> The problem is when a softirq disabled section gets interrupted and on
> return from interrupt the tick/nohz state is evaluated, which then can
> observe pending soft interrupts. These soft interrupts are legitimately
> pending because they cannot be processed as long as soft interrupts are
> disabled and the interrupted code will correctly process them when soft
> interrupts are reenabled.
> 
> Add a check for softirqs disabled to the pending check to prevent the
> warning.
> 
> Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Reported-by: John Crispin <john@phrozen.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Tested-by: John Crispin <john@phrozen.org>

Acked-by: Frederic Weisbecker <frederic@kernel.org>

Thanks for cooking the patch!

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

* Re: [PATCH stable] tick/nohz: Prevent bogus softirq pending warning
  2018-08-30 15:05 [PATCH stable] tick/nohz: Prevent bogus softirq pending warning Thomas Gleixner
  2018-08-30 15:12 ` Frederic Weisbecker
@ 2018-09-12 13:56 ` Geert Uytterhoeven
  2018-09-27  8:07   ` Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2018-09-12 13:56 UTC (permalink / raw
  To: Thomas Gleixner
  Cc: John Crispin, frederic, Linux Kernel Mailing List, Ingo Molnar,
	Anna-Maria Gleixner, Greg KH, stable

Hi Thomas,

On Thu, Aug 30, 2018 at 5:06 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an
> inline softirq") got backported to stable trees and now causes the NOHZ
> softirq pending warning to trigger. It's not an upstream issue as the NOHZ
> update logic has been changed there.
>
> The problem is when a softirq disabled section gets interrupted and on
> return from interrupt the tick/nohz state is evaluated, which then can
> observe pending soft interrupts. These soft interrupts are legitimately
> pending because they cannot be processed as long as soft interrupts are
> disabled and the interrupted code will correctly process them when soft
> interrupts are reenabled.
>
> Add a check for softirqs disabled to the pending check to prevent the
> warning.
>
> Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Reported-by: John Crispin <john@phrozen.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Tested-by: John Crispin <john@phrozen.org>
> Cc: Frederic Weisbecker <frederic@kernel.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: stable@vger.kernel.org

Fixes: 2d898915ccf4838c ("nohz: Fix missing tick reprogram when
interrupting an inline softirq")

Issue in v4.14.x bisected to the above commit, and fixed by your patch.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH stable] tick/nohz: Prevent bogus softirq pending warning
  2018-09-12 13:56 ` Geert Uytterhoeven
@ 2018-09-27  8:07   ` Geert Uytterhoeven
  2018-09-27  8:48     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2018-09-27  8:07 UTC (permalink / raw
  To: Greg KH
  Cc: John Crispin, frederic, Linux Kernel Mailing List, Ingo Molnar,
	Anna-Maria Gleixner, Thomas Gleixner, stable

Hi Greg,

On Wed, Sep 12, 2018 at 3:56 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Aug 30, 2018 at 5:06 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> > Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an
> > inline softirq") got backported to stable trees and now causes the NOHZ
> > softirq pending warning to trigger. It's not an upstream issue as the NOHZ
> > update logic has been changed there.
> >
> > The problem is when a softirq disabled section gets interrupted and on
> > return from interrupt the tick/nohz state is evaluated, which then can
> > observe pending soft interrupts. These soft interrupts are legitimately
> > pending because they cannot be processed as long as soft interrupts are
> > disabled and the interrupted code will correctly process them when soft
> > interrupts are reenabled.
> >
> > Add a check for softirqs disabled to the pending check to prevent the
> > warning.
> >
> > Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > Reported-by: John Crispin <john@phrozen.org>
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > Tested-by: John Crispin <john@phrozen.org>
> > Cc: Frederic Weisbecker <frederic@kernel.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: stable@vger.kernel.org
>
> Fixes: 2d898915ccf4838c ("nohz: Fix missing tick reprogram when
> interrupting an inline softirq")
>
> Issue in v4.14.x bisected to the above commit, and fixed by your patch.
>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

This issue is still present in v4.14.72. Can you please apply Thomas' fix?
Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH stable] tick/nohz: Prevent bogus softirq pending warning
  2018-09-27  8:07   ` Geert Uytterhoeven
@ 2018-09-27  8:48     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2018-09-27  8:48 UTC (permalink / raw
  To: Geert Uytterhoeven
  Cc: John Crispin, frederic, Linux Kernel Mailing List, Ingo Molnar,
	Anna-Maria Gleixner, Thomas Gleixner, stable

On Thu, Sep 27, 2018 at 10:07:39AM +0200, Geert Uytterhoeven wrote:
> Hi Greg,
> 
> On Wed, Sep 12, 2018 at 3:56 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, Aug 30, 2018 at 5:06 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> > > Commit 0a0e0829f990 ("nohz: Fix missing tick reprogram when interrupting an
> > > inline softirq") got backported to stable trees and now causes the NOHZ
> > > softirq pending warning to trigger. It's not an upstream issue as the NOHZ
> > > update logic has been changed there.
> > >
> > > The problem is when a softirq disabled section gets interrupted and on
> > > return from interrupt the tick/nohz state is evaluated, which then can
> > > observe pending soft interrupts. These soft interrupts are legitimately
> > > pending because they cannot be processed as long as soft interrupts are
> > > disabled and the interrupted code will correctly process them when soft
> > > interrupts are reenabled.
> > >
> > > Add a check for softirqs disabled to the pending check to prevent the
> > > warning.
> > >
> > > Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > > Reported-by: John Crispin <john@phrozen.org>
> > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > > Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > > Tested-by: John Crispin <john@phrozen.org>
> > > Cc: Frederic Weisbecker <frederic@kernel.org>
> > > Cc: Ingo Molnar <mingo@kernel.org>
> > > Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Cc: stable@vger.kernel.org
> >
> > Fixes: 2d898915ccf4838c ("nohz: Fix missing tick reprogram when
> > interrupting an inline softirq")
> >
> > Issue in v4.14.x bisected to the above commit, and fixed by your patch.
> >
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> This issue is still present in v4.14.72. Can you please apply Thomas' fix?

Oops, sorry for the delay, now queued up.

greg k-h

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

end of thread, other threads:[~2018-09-27  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-30 15:05 [PATCH stable] tick/nohz: Prevent bogus softirq pending warning Thomas Gleixner
2018-08-30 15:12 ` Frederic Weisbecker
2018-09-12 13:56 ` Geert Uytterhoeven
2018-09-27  8:07   ` Geert Uytterhoeven
2018-09-27  8:48     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.