mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] irq: Set CPU affinity soon after irq thread is created
@ 2012-10-31 20:41 Sankara Muthukrishnan
  2012-11-01 21:37 ` [tip:irq/core] irq: Set CPU affinity right on thread creation tip-bot for Sankara Muthukrishnan
  0 siblings, 1 reply; 2+ messages in thread
From: Sankara Muthukrishnan @ 2012-10-31 20:41 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, linux-rt-users, Steven Rostedt

From: Sankara S Muthukrishnan <sankara.m@ni.com>

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 soon 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>
---
Hi Thomas,

As we discussed in the original thread
http://marc.info/?l=linux-kernel&m=134987001701683&w=2 , I am sending
this patch against the current mainline.

 kernel/irq/manage.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4c69326..020b535 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -833,6 +833,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;

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-01 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 20:41 [PATCH 1/1] irq: Set CPU affinity soon after irq thread is created Sankara Muthukrishnan
2012-11-01 21:37 ` [tip:irq/core] irq: Set CPU affinity right on thread creation tip-bot for Sankara Muthukrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome