Skip to content

Commit 8032359

Browse files
johnkeepingKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f4bf3ca commit 8032359

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/irq/manage.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,12 @@ void irq_set_thread_affinity(struct irq_desc *desc)
189189
{
190190
struct irqaction *action;
191191

192-
for_each_action_of_desc(desc, action)
192+
for_each_action_of_desc(desc, action) {
193193
if (action->thread)
194194
set_bit(IRQTF_AFFINITY, &action->thread_flags);
195+
if (action->secondary && action->secondary->thread)
196+
set_bit(IRQTF_AFFINITY, &action->secondary->thread_flags);
197+
}
195198
}
196199

197200
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK

0 commit comments

Comments
 (0)