public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created
@ 2012-09-05 23:07 Sankara Muthukrishnan
  2012-09-06  0:09 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Sankara Muthukrishnan @ 2012-09-05 23:07 UTC (permalink / raw)
  To: linux-rt-users; +Cc: Steven Rostedt, Thomas Gleixner

Hi there,

As irq_thread_check_affinity is called inside the while loop in the
IRQ thread, the core affinity is set only when an interrupt happens.
It does not seem to be a bad idea to set the core affinity soon after
the thread is created also (as shown in the patch).
irq_thread_check_affinity calls kmalloc_node that can sleep. In an
embedded target where IRQ affinities are pre-configured during
boot-time (and not modified through /proc/irq/../smp_affinity) during
run-time, the extra latency due to irq_thread_check_affinity can be
avoided during processing of the first interrupt with this patch.
Thoughts?

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 87dc053..bf2cdc2 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -791,6 +791,7 @@ static int irq_thread(void *data)

        sched_setscheduler(current, SCHED_FIFO, &param);
        current->irqaction = action;
+       irq_thread_check_affinity(desc, action);

        while (!irq_wait_for_interrupt(action)) {

- Sankara

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

end of thread, other threads:[~2012-10-09 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 23:07 [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created Sankara Muthukrishnan
2012-09-06  0:09 ` Steven Rostedt
2012-10-09 20:25   ` Thomas Gleixner

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