summaryrefslogtreecommitdiff
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-06-10 10:09:28 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-10 10:09:28 -0700
commit95203fe78007f9ab3aebb96606473ae18c00a5a8 (patch)
tree3ebdaf0b10d925e6ec4ba95dcf2426bbdadfb190 /include/linux/moduleparam.h
parent9c1d07947fab9b666b34ce258fdb6dbd37d72ac4 (diff)
[PATCH] optimize fixed-sized kmalloc calls
From: Manfred Spraul and Brian Gerst The patch performs the kmalloc cache lookup for constant kmalloc calls at compile time. The idea is that the loop in kmalloc takes a significant amount of time, and for kmalloc(4096,GFP_KERNEL), that lookup can happen entirely at compile time. A problem has been seen with gcc-3.2.2-5 from RedHat. This code: if(__builtin_constant_t(size)) { if(size < 32) return kmem_cache_alloc(...); if(size < 64) return kmem_cache_alloc(...); if(size < 96) return kmem_cache_alloc(...); if(size < 128) return kmem_cache_alloc(...); ... } doesn't work, because gcc only optimizes the first two or three comparisons, and then suddenly generates code. But we did it that way anyway. Apparently it's fixed in later compilers.
Diffstat (limited to 'include/linux/moduleparam.h')
0 files changed, 0 insertions, 0 deletions