[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <161356785301.20312.17140312346684582449.tip-bot2@tip-bot2>
Date: Wed, 17 Feb 2021 13:17:33 -0000
From: "tip-bot2 for Sebastian Andrzej Siewior" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] smp: Process pending softirqs in
flush_smp_call_function_from_idle()
The following commit has been merged into the sched/core branch of tip:
Commit-ID: f9d34595ae4feed38856b88769e2ba5af22d2548
Gitweb: https://git.kernel.org/tip/f9d34595ae4feed38856b88769e2ba5af22d2548
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Sat, 23 Jan 2021 21:10:25 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 17 Feb 2021 14:12:42 +01:00
smp: Process pending softirqs in flush_smp_call_function_from_idle()
send_call_function_single_ipi() may wake an idle CPU without sending an
IPI. The woken up CPU will process the SMP-functions in
flush_smp_call_function_from_idle(). Any raised softirq from within the
SMP-function call will not be processed.
Should the CPU have no tasks assigned, then it will go back to idle with
pending softirqs and the NOHZ will rightfully complain.
Process pending softirqs on return from flush_smp_call_function_queue().
Fixes: b2a02fc43a1f4 ("smp: Optimize send_call_function_single_ipi()")
Reported-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Link: https://lkml.kernel.org/r/20210123201027.3262800-2-bigeasy@linutronix.de
---
kernel/smp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/smp.c b/kernel/smp.c
index 1b6070b..aeb0adf 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -14,6 +14,7 @@
#include <linux/export.h>
#include <linux/percpu.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
@@ -449,6 +450,9 @@ void flush_smp_call_function_from_idle(void)
local_irq_save(flags);
flush_smp_call_function_queue(true);
+ if (local_softirq_pending())
+ do_softirq();
+
local_irq_restore(flags);
}
Powered by blists - more mailing lists