mm/slab: move kfree() from slab_common.c to slub.c
This should result in better code. Currently kfree() makes a function call between compilation units to __kmem_cache_free() which does its own virt_to_slab(), throwing away the struct slab pointer we already had in kfree(). Now it can be reused. Additionally kfree() can now inline the whole SLUB freeing fastpath. Also move over free_large_kmalloc() as the only callsites are now in slub.c, and make it static. Reviewed-by:Kees Cook <keescook@chromium.org> Acked-by:
David Rientjes <rientjes@google.com> Tested-by:
David Rientjes <rientjes@google.com> Reviewed-by:
Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by:
Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by:
Vlastimil Babka <vbabka@suse.cz>
Loading
Please register or sign in to comment