Hi, kmalloc(constant,GFP_KERNEL) spends a singificant amount of time in the initial loop that finds the correct cache. For constant allocations, the correct cache can be indentified at compile time. What do you think about the attached patch? It's not pretty, but it should work will all gcc versions. Any other ideas? Just FYI: The function that forced me to use use switch/case instead of if is interrupts_open in fs/proc/proc_misc.c. -- Manfred