[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a5jkb4d2xolobcddbac6enh2vjdbi3u6wtwfavo2h4ps2iietq@63nnefjw622b>
Date: Sat, 17 Jan 2026 11:24:01 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>, Minchan Kim <minchan@...nel.org>, Nhat Pham <nphamcs@...il.com>,
Johannes Weiner <hannes@...xchg.org>, Brian Geffon <bgeffon@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [RFC PATCH] zsmalloc: make common caches global
On (26/01/16 20:49), Yosry Ahmed wrote:
> On Fri, Jan 16, 2026 at 01:48:41PM +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.
>
> I had a similar patch internally when we had 32 zsmalloc pools with
> zswap.
Oh, nice.
> You can calculate the savings by using /proc/slabinfo. The unused memory
> is (num_objs-active_objs)*objsize. You can sum this across all caches
> when you have multiple pools, and compare it to the unused memory with a
> single cache.
Right. Just curious, do you recall any numbers?
[..]
> Hmm instead of the repeated kmem_cache_destroy() calls, can we do sth
> like this:
Sure.
Powered by blists - more mailing lists