From: Thomas Gleixner <tglx@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Sankara Muthukrishnan <sankara.m@gmail.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] irq: Set CPU affinity as soon as the irq thread is created
Date: Tue, 9 Oct 2012 22:25:36 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1210092224480.10988@ionos> (raw)
In-Reply-To: <1346890155.27919.80.camel@gandalf.local.home>
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
>
prev parent reply other threads:[~2012-10-09 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.02.1210092224480.10988@ionos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sankara.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox