diff options
author | Zhang Yanmin <yanmin.zhang@intel.com> | 2006-06-23 05:04:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:42:57 -0400 |
commit | 1b61b910e99059abdd54c93aa70e84e076e33d16 (patch) | |
tree | fe2cd431dc39521a0f2d30e22c9bd3eb3e1bc317 /include/linux/irq.h | |
parent | afa024c3dbccf026e45121f4b9de54cda48edbea (diff) |
[PATCH] x86: kernel irq balance doesn't work
On i386, kernel irq balance doesn't work.
1) In function do_irq_balance, after kernel finds the min_loaded cpu but
before calling set_pending_irq to really pin the selected_irq to the
target cpu, kernel does a cpus_and with irq_affinity[selected_irq].
Later on, when the irq is acked, kernel would calls
move_native_irq=>desc->handler->set_affinity to change the irq affinity.
However, every function pointed by
hw_interrupt_type->set_affinity(unsigned int irq, cpumask_t cpumask)
always changes irq_affinity[irq] to cpumask. Next time when recalling
do_irq_balance, it has to do cpu_ands again with
irq_affinity[selected_irq], but irq_affinity[selected_irq] already
becomes one cpu selected by the first irq balance.
2) Function balance_irq in file arch/i386/kernel/io_apic.c has the same
issue.
[akpm@osdl.org: cleanups]
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 42c9cd562860..e8a07e75e4fb 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -164,6 +164,14 @@ static inline void set_irq_info(int irq, cpumask_t mask) | |||
164 | 164 | ||
165 | #endif // CONFIG_SMP | 165 | #endif // CONFIG_SMP |
166 | 166 | ||
167 | #ifdef CONFIG_IRQBALANCE | ||
168 | extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); | ||
169 | #else | ||
170 | static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) | ||
171 | { | ||
172 | } | ||
173 | #endif | ||
174 | |||
167 | extern int no_irq_affinity; | 175 | extern int no_irq_affinity; |
168 | extern int noirqdebug_setup(char *str); | 176 | extern int noirqdebug_setup(char *str); |
169 | 177 | ||