From: Pingfan Liu <kernelfans@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Pingfan Liu <kernelfans@gmail.com>, Thomas Gleixner <tglx@linutronix.de>
Subject: [RFC 09/10] genirq/cpuhotplug: Ask migrate_one_irq() to migrate to a real online cpu
Date: Mon, 22 Aug 2022 10:15:19 +0800 [thread overview]
Message-ID: <20220822021520.6996-10-kernelfans@gmail.com> (raw)
In-Reply-To: <20220822021520.6996-1-kernelfans@gmail.com>
In kexec quick reboot path, the dying cpus are still on the
cpu_online_mask, but the interrupt should be migrated onto a real online
cpu instead of a dying one. Otherwise, the interrupt has no opportunity
to move onto a live cpu.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
To: linux-kernel@vger.kernel.org
---
kernel/irq/cpuhotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c
index 1ed2b1739363..e85d6456f310 100644
--- a/kernel/irq/cpuhotplug.c
+++ b/kernel/irq/cpuhotplug.c
@@ -110,6 +110,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
if (maskchip && chip->irq_mask)
chip->irq_mask(d);
+ cpumask_andnot(affinity, affinity, cpu_dying_mask);
if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
/*
* If the interrupt is managed, then shut it down and leave
@@ -120,7 +121,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
irq_shutdown_and_deactivate(desc);
return false;
}
- affinity = cpu_online_mask;
+ cpumask_andnot(affinity, cpu_online_mask, cpu_dying_mask);
brokeaff = true;
}
/*
--
2.31.1
next prev parent reply other threads:[~2022-08-22 2:17 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 2:15 [RFC 00/10] arm64/riscv: Introduce fast kexec reboot Pingfan Liu
2022-08-22 2:15 ` [RFC 01/10] cpu/hotplug: Make __cpuhp_kick_ap() ready for async Pingfan Liu
2022-08-22 2:15 ` [RFC 02/10] cpu/hotplug: Compile smp_shutdown_nonboot_cpus() conditioned on CONFIG_SHUTDOWN_NONBOOT_CPUS Pingfan Liu
2022-08-22 2:15 ` [RFC 03/10] cpu/hotplug: Introduce fast kexec reboot Pingfan Liu
2022-08-22 2:15 ` [RFC 04/10] cpu/hotplug: Check the capability of kexec quick reboot Pingfan Liu
2022-08-22 2:15 ` [RFC 05/10] perf/arm-dsu: Make dsu_pmu_cpu_teardown() parallel Pingfan Liu
2022-08-22 2:15 ` [RFC 06/10] rcu/hotplug: Make rcutree_dead_cpu() parallel Pingfan Liu
2022-08-22 2:45 ` Paul E. McKenney
2022-08-23 1:50 ` Pingfan Liu
2022-08-23 3:01 ` Paul E. McKenney
2022-08-24 13:53 ` Pingfan Liu
2022-08-24 16:20 ` Paul E. McKenney
2022-08-24 17:26 ` Joel Fernandes
2022-08-24 19:21 ` Paul E. McKenney
2022-08-24 22:54 ` Joel Fernandes
2022-08-24 23:01 ` Paul E. McKenney
2022-08-31 16:15 ` Paul E. McKenney
2022-09-05 3:53 ` Pingfan Liu
2022-09-06 18:45 ` Paul E. McKenney
2022-08-22 18:08 ` Joel Fernandes
2022-08-23 1:56 ` Pingfan Liu
2022-08-23 3:14 ` Joel Fernandes
2022-08-24 13:38 ` Pingfan Liu
2022-08-24 13:44 ` Jason A. Donenfeld
2022-08-22 2:15 ` [RFC 07/10] lib/cpumask: Introduce cpumask_not_dying_but() Pingfan Liu
2022-08-22 14:15 ` Yury Norov
2022-08-23 7:29 ` Pingfan Liu
2022-08-22 2:15 ` [RFC 08/10] cpuhp: Replace cpumask_any_but(cpu_online_mask, cpu) Pingfan Liu
2022-08-22 2:15 ` Pingfan Liu [this message]
2022-08-22 2:15 ` [RFC 10/10] arm64: smp: Make __cpu_disable() parallel Pingfan Liu
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=20220822021520.6996-10-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).