Commit 97b6cac7 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] irq balance logic fix

From: Andi Kleen <ak@suse.de>

The logic is: the global variable is set to the magic value
IRQBALANCE_CHECK_ARCH.  It can be overwritten by a __setup function.  If
the magic value is still set when the irq balancer is started it asks the
subarchitecture using the NO_BALANCE_IRQ macro.  This is defined to a
genapic field in the generic architecture, otherwise constant.  Then the
global variable is set and when it is true no balancing happens.

Previously I had this wrong in that it always disabled it.

This part should be correct, but it still doesn't seem to work.

(I left the printk in there until the problem is debugged, could be removed
of course)
parent 82852538
...@@ -352,10 +352,16 @@ static inline void balance_irq(int cpu, int irq) ...@@ -352,10 +352,16 @@ static inline void balance_irq(int cpu, int irq)
unsigned long allowed_mask; unsigned long allowed_mask;
unsigned int new_cpu; unsigned int new_cpu;
if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH && NO_BALANCE_IRQ) if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH)
return; irqbalance_disabled = NO_BALANCE_IRQ;
else if (irqbalance_disabled) if (irqbalance_disabled) {
static int warned;
if (warned == 0) {
printk("irqbalance disabled\n");
warned = 1;
}
return; return;
}
allowed_mask = cpu_online_map & irq_affinity[irq]; allowed_mask = cpu_online_map & irq_affinity[irq];
new_cpu = move(cpu, allowed_mask, now, 1); new_cpu = move(cpu, allowed_mask, now, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment