Re: [swap tier discussion] Re: [PATCH v3 2/4] mm/zswap: Implement proactive writeback
From: Shakeel Butt
Date: Tue Jun 16 2026 - 07:45:12 EST
On Tue, Jun 16, 2026 at 10:03:08AM +0900, YoungJun Park wrote:
> On Mon, Jun 15, 2026 at 12:55:09PM -0700, Yosry Ahmed wrote:
> > > In that case, the internal logic could stay roughly the same rather
> > > than counting via a page counter. Something like:
> > >
> > > 1. Change the interface shell: tier.*.max — allow only 0 ~ max.
> >
> > What about a single interface as I suggested to remain consistent with
> > memory tiering?
>
> Hello Yosry!
>
> I agree. As I was implementing the interface for seeing feasibility
> , I reconsidered it. Since swap tiers can be added or removed at runtime,
> having static memory."tier_name".max files seems unnatural.
>
> A single interface like `swap.tiers.max` would be better. We can use a
> flat-keyed format (similar to io.weight. same as you suggested)
>
> echo ["tier_name"] ["0 or max"] > swap.tiers.max
>
> I am now leaning towards this is a better direction than what I initially
> suggested (memory.swap.tiers and memory.swap.tiers.effective).
>
> Considering other reviews and Shakeel's reply, I will update my swap tier
> patch accordingly.
I like Yosry's proposal. Let's go with that.
(I am travelling, so will be slow to respond)