From: Thomas Gleixner <tglx@linutronix.de>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: miltonm@bga.com, Ian Campbell <ian.campbell@citrix.com>,
Peter Zijlstra <peterz@infradead.org>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH 1/2] IRQ: use cpu_possible_mask rather than online_mask in setup_affinity
Date: Sat, 2 Oct 2010 12:57:10 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1010021248150.14550@localhost6.localdomain6> (raw)
In-Reply-To: <1285968378-12805-2-git-send-email-nacc@us.ibm.com>
On Fri, 1 Oct 2010, Nishanth Aravamudan wrote:
> The use of online_mask requires architecture code to be hotplug-aware to
> account for IRQ round-robin'ing. With user-driven dynamic SMT, this
> could commonly occur even without physical hotplug. Without this change
> and "pseries/xics: use cpu_possible_mask rather than cpu_all_mask", IRQs
> are all routed to CPU0 on power machines with XICS not running
> irqbalance.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> ---
> I have boot-tested this on ppc64, but not yet on x86/x86_64. This is
> generic-code, and perhaps an audit of all .set_affinity functions should
> occur before upstream acceptance?
> ---
> kernel/irq/manage.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index c3003e9..ef85b95 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -175,7 +175,7 @@ static int setup_affinity(unsigned int irq, struct irq_desc *desc)
> desc->status &= ~IRQ_AFFINITY_SET;
> }
>
> - cpumask_and(desc->affinity, cpu_online_mask, irq_default_affinity);
> + cpumask_and(desc->affinity, cpu_possible_mask, irq_default_affinity);
Hmm, that looks dangerous. And auditing everything is rather horrible
especially when we need to add cpumask_and(..., cpu_online_mask, ..)
all over the place.
We should rather have something like:
cpumask_var_t *cpumask_restrict_to = &cpu_online_mask;
+ cpumask_and(desc->affinity, *cpumask_restrict_to, irq_default_affinity);
So an arch can override it in arch_early_irq_init().
Thanks,
tglx
next prev parent reply other threads:[~2010-10-02 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 21:26 [RESEND PATCH 0/2] Fix IRQ round-robing w/o irqbalance on pseries Nishanth Aravamudan
2010-10-01 21:26 ` [RESEND PATCH 1/2] IRQ: use cpu_possible_mask rather than online_mask in setup_affinity Nishanth Aravamudan
2010-10-02 10:57 ` Thomas Gleixner [this message]
2010-10-06 20:55 ` Sonny Rao
2010-10-02 11:01 ` Peter Zijlstra
2010-10-06 21:02 ` Sonny Rao
2010-10-11 18:48 ` Peter Zijlstra
2010-10-11 19:52 ` Sonny Rao
2010-10-01 21:26 ` [RESEND PATCH 2/2] pseries/xics: use cpu_possible_mask rather than cpu_all_mask Nishanth Aravamudan
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.00.1010021248150.14550@localhost6.localdomain6 \
--to=tglx@linutronix.de \
--cc=ian.campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
--cc=nacc@us.ibm.com \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®