On Sat, Dec 08, 2007 at 09:54:06AM -0800, Linus Torvalds wrote:
But what about:
(c) stop passing GFP_ZERO to kmalloc allocators
stop fiddling with flags inside allocators
remove ugly if (unlikely(gfp & GFP_ZERO)) from kmalloc allocators
make kzalloc and kcalloc non-inline functions that do the memset
That should:
- make both kmalloc and kzalloc/kcalloc faster (one less branch)
- reduce kernel size
GFP_ZERO is a bit of an abuse here, given that we don't even intend to
pass it to the underlying "GFP".
--
Mathematics is the supreme nostalgia of our time.
--