Skip to content

Commit f3de44e

Browse files
Sankara MuthukrishnanKAGA-KOKO
authored andcommitted
irq: Set CPU affinity right on thread creation
As irq_thread_check_affinity is called ONLY inside the while loop in the irq thread, the core affinity is set only when an interrupt occurs. This patch sets the core affinity right after the irq thread is created and before it waits for interrupts. In real-tiime targets that do not typically change the core affinity of irqs during run-time, this patch will save additional latency of an irq thread in setting the core affinity during the first interrupt occurrence for that irq. Signed-off-by: Sankara S Muthukrishnan <[email protected]> Acked-by: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 293a7a0 commit f3de44e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/irq/manage.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ static int irq_thread(void *data)
849849
init_task_work(&on_exit_work, irq_thread_dtor);
850850
task_work_add(current, &on_exit_work, false);
851851

852+
irq_thread_check_affinity(desc, action);
853+
852854
while (!irq_wait_for_interrupt(action)) {
853855
irqreturn_t action_ret;
854856

0 commit comments

Comments
 (0)