sparse irq_desc[] array: core kernel and x86 changes
authorYinghai Lu <yinghai@kernel.org>
Sat, 6 Dec 2008 02:58:31 +0000 (18:58 -0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 8 Dec 2008 13:31:51 +0000 (14:31 +0100)
commit0b8f1efad30bd58f89961b82dfe68b9edf8fd2ac
tree239251bad791fd60af8c0f2ba365b7188395c83f
parent218d11a8b071b23b76c484fd5f72a4fe3306801e
sparse irq_desc[] array: core kernel and x86 changes

Impact: new feature

Problem on distro kernels: irq_desc[NR_IRQS] takes megabytes of RAM with
NR_CPUS set to large values. The goal is to be able to scale up to much
larger NR_IRQS value without impacting the (important) common case.

To solve this, we generalize irq_desc[NR_IRQS] to an (optional) array of
irq_desc pointers.

When CONFIG_SPARSE_IRQ=y is used, we use kzalloc_node to get irq_desc,
this also makes the IRQ descriptors NUMA-local (to the site that calls
request_irq()).

This gets rid of the irq_cfg[] static array on x86 as well: irq_cfg now
uses desc->chip_data for x86 to store irq_cfg.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
23 files changed:
arch/x86/Kconfig
arch/x86/include/asm/irq_vectors.h
arch/x86/kernel/io_apic.c
arch/x86/kernel/irq.c
arch/x86/kernel/irq_32.c
arch/x86/kernel/irq_64.c
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c
drivers/char/random.c
drivers/pci/intr_remapping.c
drivers/xen/events.c
fs/proc/stat.c
include/linux/interrupt.h
include/linux/irq.h
include/linux/irqnr.h
include/linux/kernel_stat.h
include/linux/random.h
init/main.c
kernel/irq/autoprobe.c
kernel/irq/chip.c
kernel/irq/handle.c
kernel/irq/proc.c
kernel/irq/spurious.c