From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org
Cc: paulmck@kernel.org, mhocko@suse.com, peterz@infradead.org,
Juergen Gross <jgross@suse.com>
Subject: [PATCH v3 4/4] kernel/smp: fix flush_smp_call_function_queue() cpu offline detection
Date: Tue, 2 Mar 2021 07:28:38 +0100 [thread overview]
Message-ID: <20210302062838.14267-5-jgross@suse.com> (raw)
In-Reply-To: <20210302062838.14267-1-jgross@suse.com>
The warnings for flushing a logically offline cpu's call_single_queue
are gated by a wrong if statement. It should trigger when there have
been new requests before dequeueing them, not afterwards.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V3:
- new patch
---
kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 1a96691dbf7f..b3077c327b0a 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -581,7 +581,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)
/* There shouldn't be any pending callbacks on an offline CPU. */
if (unlikely(warn_cpu_offline && !cpu_online(smp_processor_id()) &&
- !warned && !llist_empty(head))) {
+ !warned && entry)) {
warned = true;
WARN(1, "IPI on offline CPU %d\n", smp_processor_id());
--
2.26.2
prev parent reply other threads:[~2021-03-02 8:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 6:28 [PATCH v3 0/4] kernel/smp.c: add more CSD lock debugging Juergen Gross
2021-03-02 6:28 ` [PATCH v3 1/4] kernel/smp: add boot parameter for controlling " Juergen Gross
2021-03-02 6:28 ` [PATCH v3 2/4] kernel/smp: prepare more " Juergen Gross
2021-03-02 6:28 ` [PATCH v3 3/4] kernel/smp: add more data to " Juergen Gross
2021-03-24 10:18 ` Jürgen Groß
2021-03-30 17:33 ` Paul E. McKenney
2021-04-02 15:46 ` Juergen Gross
2021-04-02 16:11 ` Paul E. McKenney
2021-04-05 7:37 ` Juergen Gross
2021-04-05 15:29 ` Paul E. McKenney
2021-03-02 6:28 ` Juergen Gross [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210302062838.14267-5-jgross@suse.com \
--to=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox