genirq: update affinity of secondary threads
PATCH 1/1 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 interrupt's activity on the assigned CPUs.
--- kernel/irq/manage.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/irq/manage.c +5 -1
@@ -189,9 +189,13 @@ 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
Signature · 1 line
2.40.0
[tip: irq/core] genirq: Update affinity of secondary threads
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 803235982b8c086184d04798d9079d236f352f88 Gitweb: https://git.kernel.org/tip/803235982b8c086184d04798d9079d236f352f88 Author: John Keeping <[email protected]> AuthorDate: Thu, 06 Apr 2023 19:08:57 +01:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Sat, 15 Apr 2023 10:17:16 +02:00
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.
--- kernel/irq/manage.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
kernel/irq/manage.c +4 -1
@@ -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