Skip to content

Commit ed5e946

Browse files
KAGA-KOKOgregkh
authored andcommitted
tick/nohz: Prevent bogus softirq pending warning
Commit 0a0e082 ("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: stable@vger.kernel.org Fixes: 2d89891 ("nohz: Fix missing tick reprogram when interrupting an inline softirq") Acked-by: Frederic Weisbecker <frederic@kernel.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 3a411a0 commit ed5e946

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/time/tick-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
908908
if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
909909
static int ratelimit;
910910

911-
if (ratelimit < 10 &&
911+
if (ratelimit < 10 && !in_softirq() &&
912912
(local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) {
913913
pr_warn("NOHZ: local_softirq_pending %02x\n",
914914
(unsigned int) local_softirq_pending());

0 commit comments

Comments
 (0)