diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-02-20 22:57:52 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-21 02:10:13 +0100 |
commit | 8ef8286689c6b5bc76212437b85bdd2ba749ee44 (patch) | |
tree | 9ef088691bd06699adc6c7875bc1b2e6e96ce066 /mm/slab.c | |
parent | [PATCH] Convert highest_possible_processor_id to nr_cpu_ids (diff) | |
download | linux-8ef8286689c6b5bc76212437b85bdd2ba749ee44.tar.xz linux-8ef8286689c6b5bc76212437b85bdd2ba749ee44.zip |
[PATCH] slab: reduce size of alien cache to cover only possible nodes
The alien cache is a per cpu per node array allocated for every slab on the
system. Currently we size this array for all nodes that the kernel does
support. For IA64 this is 1024 nodes. So we allocate an array with 1024
objects even if we only boot a system with 4 nodes.
This patch uses "nr_node_ids" to determine the number of possible nodes
supported by a hardware configuration and only allocates an alien cache
sized for possible nodes.
The initialization of nr_node_ids occurred too late relative to the bootstrap
of the slab allocator and so I moved the setup_nr_node_ids() into
free_area_init_nodes().
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | mm/slab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c index 70784b848b69..8fdaffa717ea 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1042,7 +1042,7 @@ static void *alternate_node_alloc(struct kmem_cache *, gfp_t); static struct array_cache **alloc_alien_cache(int node, int limit) { struct array_cache **ac_ptr; - int memsize = sizeof(void *) * MAX_NUMNODES; + int memsize = sizeof(void *) * nr_node_ids; int i; if (limit > 1) |