* [RFC PATCH 1/2] IRQ: use cpu_possible_mask rather than online_mask in setup_affinity
2010-09-27 23:17 [RFC PATCH 0/2] Fix IRQ round-robing w/o irqbalance on pseries Nishanth Aravamudan
@ 2010-09-27 23:17 ` Nishanth Aravamudan
2010-09-27 23:17 ` [RFC PATCH 2/2] pseries/xics: use cpu_possible_mask rather than cpu_all_mask Nishanth Aravamudan
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Aravamudan @ 2010-09-27 23:17 UTC (permalink / raw)
To: nacc
Cc: miltonm, Thomas Gleixner, Ian Campbell, Peter Zijlstra,
Peter P Waskiewicz Jr, linux-kernel
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 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);
set_affinity:
desc->chip->set_affinity(irq, desc->affinity);
--
1.7.0.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC PATCH 2/2] pseries/xics: use cpu_possible_mask rather than cpu_all_mask
2010-09-27 23:17 [RFC PATCH 0/2] Fix IRQ round-robing w/o irqbalance on pseries Nishanth Aravamudan
2010-09-27 23:17 ` [RFC PATCH 1/2] IRQ: use cpu_possible_mask rather than online_mask in setup_affinity Nishanth Aravamudan
@ 2010-09-27 23:17 ` Nishanth Aravamudan
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Aravamudan @ 2010-09-27 23:17 UTC (permalink / raw)
To: nacc
Cc: miltonm, Benjamin Herrenschmidt, Paul Mackerras, Anton Blanchard,
Mark Nelson, Thomas Gleixner, Michael Ellerman, linuxppc-dev,
linux-kernel
Current firmware only allows us to send IRQs to the first processor or
all processors. We currently check to see if the passed in mask is equal
to the all_mask, but the firmware is only considering whether the
request is for the equivalent of the possible_mask. Thus, we think the
request is for some subset of CPUs and only assign IRQs to the first CPU
(on systems without irqbalance running) as evidenced by
/proc/interrupts. By using possible_mask instead, we account for this
and proper interleaving of interrupts occurs. Without this change and
"pseries/xics: use cpu_possible_mask rather than cpu_all_mask", IRQs are
all routed to CPU0 on power machines not running irqbalance.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
arch/powerpc/platforms/pseries/xics.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 93834b0..7c1e342 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -178,7 +178,7 @@ static int get_irq_server(unsigned int virq, const struct cpumask *cpumask,
if (!distribute_irqs)
return default_server;
- if (!cpumask_equal(cpumask, cpu_all_mask)) {
+ if (!cpumask_subset(cpu_possible_mask, cpumask)) {
int server = cpumask_first_and(cpu_online_mask, cpumask);
if (server < nr_cpu_ids)
--
1.7.0.4
^ permalink raw reply [flat|nested] 3+ messages in thread