From: Thomas Gleixner <tglx@linutronix.de>
To: Sankara Muthukrishnan <sankara.m@gmail.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH RFC] irq: Honor /proc/irq core affinity when an IRQ thread is created
Date: Tue, 4 Sep 2012 17:43:37 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1209041738200.2754@ionos> (raw)
In-Reply-To: <CAFQPvXe0siyupbZvnEVFQi-nog4qObGejX9HxgxeVgOphJoyTA@mail.gmail.com>
On Mon, 27 Aug 2012, Sankara Muthukrishnan wrote:
> Hi everyone,
>
> I would like to get some feedback from the RT community before
> submitting to the mainline.
>
> Currently, by writing to /proc/irq/../smp_affinity file, core affinity
> of already running IRQ threads can be modified. However, after writing
> to the /proc file, an IRQ thread that gets created later does not
> inherit the affinity specified in the file. This happens because the
> irq action is registered in irq description only after setup_affinity
> function is called. This patch addresses this problem by calling
> setup_affinity function after the irq action is updated in the irq
> description structure. It looks like the existing behavior (without
> this patch) is inconsistent because in the case of multiple action
> handlers for an irq, the IRQ thread associated with the new action
> handler that is being registered does not inherit the core affinity
> from the /proc file, however, the IRQ threads of the existing action
> handlers do inherit the affinity.
I understand the problem, but the proposed patch is not going to solve
it. setup_affinity() is just called in the !shared case, which is the
first action which is set up. So that works for the first irq, but not
for later ones.
Does the following patch fix the problem for both shared and non
shared interrupts ?
Thanks,
tglx
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4c69326..a16ff28 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -936,6 +936,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
*/
get_task_struct(t);
new->thread = t;
+ set_bit(IRQTF_AFFINITY, &new->thread_flags);
}
if (!alloc_cpumask_var(&mask, GFP_KERNEL)) {
next prev parent reply other threads:[~2012-09-04 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 22:27 [PATCH RFC] irq: Honor /proc/irq core affinity when an IRQ thread is created Sankara Muthukrishnan
2012-09-04 15:43 ` Thomas Gleixner [this message]
2012-09-05 20:28 ` Sankara Muthukrishnan
2012-11-03 10:50 ` Thomas Gleixner
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.1209041738200.2754@ionos \
--to=tglx@linutronix.de \
--cc=linux-rt-users@vger.kernel.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