diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-10-28 10:40:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-29 02:17:07 -0400 |
commit | 5c1eb08936693cd78c71164c8bea0b086ae72c67 (patch) | |
tree | c574c0702264acba1a695148dae27cf189287acc /arch/x86/kernel/irq_32.c | |
parent | 419db274bed4269f475a8e78cbe9c917192cfe8b (diff) |
x86-32: Restore irq stacks NUMA-aware allocations
Commit 22d4cd4c4d ("Allocate irq stacks seperate from percpu
area") removed NUMA affinity of IRQ stacks as side-effect of
the fix.
Using alloc_pages_node() instead of __get_free_pages() is safe,
even if the target node has no available LOWMEM pages :
alloc_pages_node() fallbacks to another node.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Brian Gerst <brgerst@gmail.com>
Cc: tj@kernel.org
Cc: torvalds@linux-foundation.org
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1288276854.2649.607.camel@edumazet-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/irq_32.c')
-rw-r--r-- | arch/x86/kernel/irq_32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 64668dbf00a4..96656f207751 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
19 | #include <linux/percpu.h> | 19 | #include <linux/percpu.h> |
20 | #include <linux/mm.h> | ||
20 | 21 | ||
21 | #include <asm/apic.h> | 22 | #include <asm/apic.h> |
22 | 23 | ||
@@ -125,7 +126,9 @@ void __cpuinit irq_ctx_init(int cpu) | |||
125 | if (per_cpu(hardirq_ctx, cpu)) | 126 | if (per_cpu(hardirq_ctx, cpu)) |
126 | return; | 127 | return; |
127 | 128 | ||
128 | irqctx = (union irq_ctx *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER); | 129 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
130 | THREAD_FLAGS, | ||
131 | THREAD_ORDER)); | ||
129 | irqctx->tinfo.task = NULL; | 132 | irqctx->tinfo.task = NULL; |
130 | irqctx->tinfo.exec_domain = NULL; | 133 | irqctx->tinfo.exec_domain = NULL; |
131 | irqctx->tinfo.cpu = cpu; | 134 | irqctx->tinfo.cpu = cpu; |
@@ -134,7 +137,9 @@ void __cpuinit irq_ctx_init(int cpu) | |||
134 | 137 | ||
135 | per_cpu(hardirq_ctx, cpu) = irqctx; | 138 | per_cpu(hardirq_ctx, cpu) = irqctx; |
136 | 139 | ||
137 | irqctx = (union irq_ctx *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER); | 140 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
141 | THREAD_FLAGS, | ||
142 | THREAD_ORDER)); | ||
138 | irqctx->tinfo.task = NULL; | 143 | irqctx->tinfo.task = NULL; |
139 | irqctx->tinfo.exec_domain = NULL; | 144 | irqctx->tinfo.exec_domain = NULL; |
140 | irqctx->tinfo.cpu = cpu; | 145 | irqctx->tinfo.cpu = cpu; |