Re: [PATCHv2] zsmalloc: make common caches global

From: Yosry Ahmed

Date: Tue Jan 20 2026 - 20:37:57 EST


On Sat, Jan 17, 2026 at 11:54:05AM +0900, Sergey Senozhatsky 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>

Reviewed-by: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>