summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-05-06 14:49:29 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:12:53 -0700
commit8da3430d8a7f885c2bf65121181d76c9d290a86e (patch)
tree7c5b181f1aaafba569f8c8b7de9cded5dfa9164c /mm/page_alloc.c
parent6310984694c8204ad16a2414cd58808fae68e02b (diff)
downloadop-kernel-dev-8da3430d8a7f885c2bf65121181d76c9d290a86e.zip
op-kernel-dev-8da3430d8a7f885c2bf65121181d76c9d290a86e.tar.gz
slab: NUMA kmem_cache diet
Some NUMA machines have a big MAX_NUMNODES (possibly 1024), but fewer possible nodes. This patch dynamically sizes the 'struct kmem_cache' to allocate only needed space. I moved nodelists[] field at the end of struct kmem_cache, and use the following computation in kmem_cache_init() cache_cache.buffer_size = offsetof(struct kmem_cache, nodelists) + nr_node_ids * sizeof(struct kmem_list3 *); On my two nodes x86_64 machine, kmem_cache.obj_size is now 192 instead of 704 (This is because on x86_64, MAX_NUMNODES is 64) On bigger NUMA setups, this might reduce the gfporder of "cache_cache" Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Christoph Lameter <clameter@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud