Please sign in to comment.
kmalloc: Use 'fls' to round up the size to the nearest power of 2
On average tests conducted on Intel i3, i7 and xeon-e3 in x86_64 mode, fls version is 3 times faster than the simple loop version. Submitted-by: vsrinivas@ Also M_POWEROF2 flag is used to do the nearest power of 2 size rounding up, instead of a seperate function (was kmalloc_powerof2) Suggested-by: sjg@, vsrinivas@
- Loading branch information...
Showing with 26 additions and 15 deletions.