aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorSankara Muthukrishnan <sankara.m@gmail.com>2012-10-31 16:41:23 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-11-01 07:11:31 -0400
commitf3de44edf376d18773febca6a37800c042bada7d (patch)
tree43e750bc026372f5a657afac98f50a9e74d21dfd /kernel/irq
parent293a7a0a165c4f8327bbcf396cee9ec672727c98 (diff)
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 <sankara.m@ni.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index d06a396c7ce3..1cbd572f6ad8 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -849,6 +849,8 @@ static int irq_thread(void *data)
849 init_task_work(&on_exit_work, irq_thread_dtor); 849 init_task_work(&on_exit_work, irq_thread_dtor);
850 task_work_add(current, &on_exit_work, false); 850 task_work_add(current, &on_exit_work, false);
851 851
852 irq_thread_check_affinity(desc, action);
853
852 while (!irq_wait_for_interrupt(action)) { 854 while (!irq_wait_for_interrupt(action)) {
853 irqreturn_t action_ret; 855 irqreturn_t action_ret;
854 856