Re: [PATCHv2] zsmalloc: make common caches global
From: Nhat Pham
Date: Tue Jan 20 2026 - 14:56:54 EST
On Fri, Jan 16, 2026 at 6:54 PM Sergey Senozhatsky
<senozhatsky@xxxxxxxxxxxx> wrote:
>
> Currently, zsmalloc creates kmem_cache of handles and zspages
> for each pool, which may be suboptimal from the memory usage
> point of view (extra internal fragmentation per pool). Systems
> that create multiple zsmalloc pools may benefit from shared
> common zsmalloc caches.
>
> Make handles and zspages kmem caches global. The memory
> savings depend on particular setup and data patterns and
> can be found via slabinfo.
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
LGTM!
Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>