Re: [PATCH 16/23] genirq/cpuhotplug: Use RCU to protect access of HK_TYPE_MANAGED_IRQ cpumask
From: Waiman Long
Date: Tue Apr 21 2026 - 10:37:43 EST
On 4/21/26 5:02 AM, Thomas Gleixner wrote:
On Mon, Apr 20 2026 at 23:03, Waiman Long wrote:This part should go into another patch.
As HK_TYPE_MANAGED_IRQ cpumask is going to be changeable at run time,Can be done?
use RCU to protect access to the cpumask.
To enable the new HK_TYPE_MANAGED_IRQ cpumask to take effect, the
following steps can be done.
1) Update the HK_TYPE_MANAGED_IRQ cpumask to take out the newly isolatedWhich previously offline CPUs?
CPUs and add back the de-isolated CPUs.
2) Tear down the affected CPUs to cause irq_migrate_all_off_this_cpu()
to be called on the affected CPUs to migrate the irqs to other
HK_TYPE_MANAGED_IRQ housekeeping CPUs.
3) Bring up the previously offline CPUs to invoke
irq_affinity_online_cpu() to allow the newly de-isolated CPUs to
be used for managed irqs.
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.cHow is this hunk related to $Subject?
index 2e8072437826..8270c4de260b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -263,6 +263,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, bool
housekeeping_enabled(HK_TYPE_MANAGED_IRQ)) {
const struct cpumask *hk_mask;
+ guard(rcu)();
hk_mask = housekeeping_cpumask(HK_TYPE_MANAGED_IRQ);
cpumask_and(tmp_mask, mask, hk_mask);
The subject is actually about using RCU to protect access to housekeeping cpumask. There are extra info in the commit log that should go to another patch.
Cheers,
Longman