From: Sankara Muthukrishnan Date: Wed, 31 Oct 2012 20:41:23 +0000 (-0500) Subject: irq: Set CPU affinity right on thread creation X-Git-Tag: upstream/snapshot3+hdmi~5743^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3de44edf376d18773febca6a37800c042bada7d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Steven Rostedt Link: http://lkml.kernel.org/r/CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com Signed-off-by: Thomas Gleixner --- diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d06a396..1cbd572 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -849,6 +849,8 @@ static int irq_thread(void *data) init_task_work(&on_exit_work, irq_thread_dtor); task_work_add(current, &on_exit_work, false); + irq_thread_check_affinity(desc, action); + while (!irq_wait_for_interrupt(action)) { irqreturn_t action_ret;