| Date | Mon, 13 Nov 2023 20:45:48 -0800 | From | Kees Cook <> | Subject | Re: [PATCH 15/20] mm/slab: move kfree() from slab_common.c to slub.c |
| |
On Mon, Nov 13, 2023 at 08:13:56PM +0100, Vlastimil Babka wrote: > 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. > > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Kees Cook <keescook@chromium.org>
-- Kees Cook
|