Manfred Spraul wrote:
> As an second optimization, we might try to optimize kmalloc for fixed
> size allocations:
> with __builtin_constant_p() we could directly allocate from the correct
> cs_cachep without the loop in kmalloc().
I've done this in user space and it works very nicely.
Even better than picking the cs_cachep: you can inline the allocation &
the free to very small fast code in cases where it's a per CPU slab (or
only one SLAB). It's just a matter of pulling something off the free
list. For ultimate performance, use a ".text.lock" style extra section
to contain the slow case code ;-)
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:08 EST