* Re: [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created [not found] <CAFQPvXckDMhH6MCkXC44wF0t13Ov=yQwER8GZgRRA4aq5=_w9w@mail.gmail.com> @ 2012-09-06 0:09 ` Steven Rostedt 2012-10-09 20:25 ` Thomas Gleixner 0 siblings, 1 reply; 2+ messages in thread From: Steven Rostedt @ 2012-09-06 0:09 UTC (permalink / raw) To: Sankara Muthukrishnan; +Cc: linux-rt-users, Thomas Gleixner, LKML On Wed, 2012-09-05 at 18:07 -0500, Sankara Muthukrishnan wrote: > Hi there, This also affects mainline. Please Cc LKML (as I did). > > 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. Note, it only calls kmalloc if you enable CONFIG_CPUMASK_OFFSTACK, which you probably don't on an embedded device. But you might. Your embedded device may have more than 32 or 64 CPUs. I'd be more worried about calling set_cpus_allowed_ptr() than kmalloc(). > 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, ¶m); > current->irqaction = action; > + irq_thread_check_affinity(desc, action); > > while (!irq_wait_for_interrupt(action)) { I see no problem with this patch. Acked-by: Steven Rostedt <rostedt@goodmis.org> -- Steve ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created 2012-09-06 0:09 ` [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created Steven Rostedt @ 2012-10-09 20:25 ` Thomas Gleixner 0 siblings, 0 replies; 2+ messages in thread From: Thomas Gleixner @ 2012-10-09 20:25 UTC (permalink / raw) To: Steven Rostedt; +Cc: Sankara Muthukrishnan, linux-rt-users, LKML On Wed, 5 Sep 2012, Steven Rostedt wrote: > On Wed, 2012-09-05 at 18:07 -0500, Sankara Muthukrishnan wrote: > > Hi there, > > This also affects mainline. Please Cc LKML (as I did). > > > > > 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. > > Note, it only calls kmalloc if you enable CONFIG_CPUMASK_OFFSTACK, which > you probably don't on an embedded device. But you might. Your embedded > device may have more than 32 or 64 CPUs. > > I'd be more worried about calling set_cpus_allowed_ptr() than kmalloc(). > > > 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? Yes, this needs a proper Signed-off-by and an update against current mainline. Thanks, tglx > > 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, ¶m); > > current->irqaction = action; > > + irq_thread_check_affinity(desc, action); > > > > while (!irq_wait_for_interrupt(action)) { > > I see no problem with this patch. > > Acked-by: Steven Rostedt <rostedt@goodmis.org> > > -- Steve > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-09 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAFQPvXckDMhH6MCkXC44wF0t13Ov=yQwER8GZgRRA4aq5=_w9w@mail.gmail.com>
2012-09-06 0:09 ` [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created 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
all inboxes | Powered by JetHome®