Commit c1588714 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] config option for irqbalance

From: "Martin J. Bligh" <mbligh@aracnet.com>

Make irqbalance into a config option - some people (jgarzik, arjan, etc)
wanted to be able to disable it and do things from userspace instead.  This
patch allows each camp to do their own thing, which seems fair ;-)
parent 39e237fd
...@@ -826,6 +826,14 @@ config EFI ...@@ -826,6 +826,14 @@ config EFI
anything about EFI). However, even with this option, the resultant anything about EFI). However, even with this option, the resultant
kernel should continue to boot on existing non-EFI platforms. kernel should continue to boot on existing non-EFI platforms.
config IRQBALANCE
bool "Enable kernel irq balancing"
depends on SMP
default y
help
The defalut yes will allow the kernel to do irq load balancing.
Saying no will keep the kernel from doing irq load balancing.
config HAVE_DEC_LOCK config HAVE_DEC_LOCK
bool bool
depends on (SMP || PREEMPT) && X86_CMPXCHG depends on (SMP || PREEMPT) && X86_CMPXCHG
......
...@@ -280,7 +280,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask) ...@@ -280,7 +280,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
spin_unlock_irqrestore(&ioapic_lock, flags); spin_unlock_irqrestore(&ioapic_lock, flags);
} }
#if defined(CONFIG_SMP) #if defined(CONFIG_IRQBALANCE)
# include <asm/processor.h> /* kernel_thread() */ # include <asm/processor.h> /* kernel_thread() */
# include <linux/kernel_stat.h> /* kstat */ # include <linux/kernel_stat.h> /* kstat */
# include <linux/slab.h> /* kmalloc() */ # include <linux/slab.h> /* kmalloc() */
...@@ -689,9 +689,11 @@ static inline void move_irq(int irq) ...@@ -689,9 +689,11 @@ static inline void move_irq(int irq)
__initcall(balanced_irq_init); __initcall(balanced_irq_init);
#else /* !SMP */ #else /* !CONFIG_IRQBALANCE */
static inline void move_irq(int irq) { } static inline void move_irq(int irq) { }
#endif /* CONFIG_IRQBALANCE */
#ifndef CONFIG_SMP
void send_IPI_self(int vector) void send_IPI_self(int vector)
{ {
unsigned int cfg; unsigned int cfg;
...@@ -706,7 +708,7 @@ void send_IPI_self(int vector) ...@@ -706,7 +708,7 @@ void send_IPI_self(int vector)
*/ */
apic_write_around(APIC_ICR, cfg); apic_write_around(APIC_ICR, cfg);
} }
#endif /* defined(CONFIG_SMP) */ #endif /* !CONFIG_SMP */
/* /*
......
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