summaryrefslogtreecommitdiff
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2004-10-19 18:40:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-19 18:40:18 -0700
commit3fe5f54e696e7af4e38fbb7ba6079dcc22875bce (patch)
tree90deb5083483fbb68e9774ab690935f21e8fcd23 /include/linux/input.h
parent6902800445f4bfd224e82c7c3df74e48e925c001 (diff)
[PATCH] slab: reduce fragmentation due to kmem_cache_alloc_node
Attached is a patch that fixes the fragmentation that Badri noticed with kmem_cache_alloc_node. kmem_cache_alloc_node tries to allocate memory from a given node. The current implementation contains two bugs: - the node aware code was used even for !CONFIG_NUMA systems. Fix: inline function that redefines kmem_cache_alloc_node as kmem_cache_alloc for !CONFIG_NUMA. - the code always allocated a new slab for each new allocation. This caused severe fragmentation. Fix: walk the slabp lists and search for a matching page instead of allocating a new page. - the patch also adds a new statistics field for node-local allocs. They should be rare - the codepath is quite slow, especially compared to the normal kmem_cache_alloc. Signed-Off-By: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/input.h')
0 files changed, 0 insertions, 0 deletions