Re: [PATCH] slub: avoid duplicate trace_kmalloc() in __do_kmalloc_node()

From: Sang-Heon Jeon

Date: Fri Dec 04 2026 - 09:50:24 EST


On Fri, Dec 04, 2026 at 04:18:16AM +0000, Hao Li wrote:
> The call path __do_kmalloc_node() -> __kmalloc_large_node_noprof()
> results in duplicate trace_kmalloc() calls.
>
> Since __kmalloc_large_node_noprof() is a thin wrapper around
> ___kmalloc_large_node(), call ___kmalloc_large_node() directly instead.
> This skips the trace_kmalloc() in __kmalloc_large_node_noprof() and
> eliminates the duplication.
>
> Fixes: a0a44d9175b3 ("mm, slab: don't wrap internal functions with alloc_hooks()")
> Signed-off-by: Hao Li <hao.li@xxxxxxxxx>

Make sense to me. Thank you :)

Reviewed-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>

Best Regards,
Sang-Heon Jeon