summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2023-04-06 20:08:57 +0200
committerThomas Gleixner <tglx@linutronix.de>2023-04-15 10:17:16 +0200
commit803235982b8c086184d04798d9079d236f352f88 (patch)
tree2887a4b98a563571a42d833c890591610736a2c3 /kernel/irq
parentsoftirq: Add trace points for tasklet entry/exit (diff)
downloadlinux-803235982b8c086184d04798d9079d236f352f88.tar.xz
linux-803235982b8c086184d04798d9079d236f352f88.zip
genirq: Update affinity of secondary threads
For interrupts with secondary threads, the affinity is applied when the thread is created but if the interrupts affinity is changed later only the primary thread is updated. Update the secondary thread's affinity as well to keep all the interrupts activity on the assigned CPUs. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230406180857.588682-1-john@metanate.com
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 8ce75495e04f..d2742af0f0fd 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -189,9 +189,12 @@ void irq_set_thread_affinity(struct irq_desc *desc)
{
struct irqaction *action;
- for_each_action_of_desc(desc, action)
+ for_each_action_of_desc(desc, action) {
if (action->thread)
set_bit(IRQTF_AFFINITY, &action->thread_flags);
+ if (action->secondary && action->secondary->thread)
+ set_bit(IRQTF_AFFINITY, &action->secondary->thread_flags);
+ }
}
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK