From: Johannes Weiner <hannes@cmpxchg.org>
To: Youngjun Park <youngjun.park@lge.com>
Cc: h@yjaykim-poweredge-t330, akpm@linux-foundation.org,
chrisl@kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kasong@tencent.com,
mhocko@kernel.org, roman.gushchin@linux.dev,
shakeel.butt@linux.dev, muchun.song@linux.dev,
shikemeng@huaweicloud.com, baoquan.he@linux.dev,
baohua@kernel.org, yosry@kernel.org, joshua.hahnjy@gmail.com,
gunho.lee@lge.com, taejoon.song@lge.com, hyungjun.cho@lge.com,
baver.bae@lge.com, her0gyugyu@gmail.com
Subject: Re: [PATCH v10 0/6] mm/swap, memcg: Introduce swap tiers for cgroup based swap control
Date: Thu, 23 Jul 2026 10:31:04 -0400 [thread overview]
Message-ID: <amIlqHQ40baRoz3O@cmpxchg.org> (raw)
In-Reply-To: <amH9alaO97YqT8pY@yjaykim-PowerEdge-T330>
Hello Youngjun,
On Thu, Jul 23, 2026 at 08:39:22PM +0900, Youngjun Park wrote:
> On Wed, Jul 22, 2026 at 09:14:10AM -0400, Johannes Weiner wrote:
>
> Hello Johannes!
>
> > Zswap is a first-order swap destination with writeback semantics. The
> > way the discussion around zswap has been going in this thread is
> > disappointing, and I don't feel comfortable adding permanent user
> > interfaces on this basis.
>
> I have given this a lot of thought. First, could you clarify exactly which
> part of the discussion or consensus makes you hesitate? Understanding this
> will help me re-evaluate my proposal.
>
> To make sure we are on the same page, I would like to share my thoughts and
> vision for the present and future of the tier interface semantics for your
> further consideration.
>
> The interface should provide the swap amount allocated to a tier and allow
> the use of the swap device defined by that tier via swap.tiers.max.
> Currently, it would only support 0 and 'max' (essentially on/off for
> explicit usage). Auto-demotion is planned for the future, and specifying
> exact capacity limits is still to be determined. (I have also reviewed
> potential interface collisions and duplications based on Yosry's guidance.)
This is the part that makes me uncomfortable. The interface as
proposed now is just a small subset of what should eventually be "swap
tiers" - with limits, hierarchies and demotion rules. It seems to be
an unordered blacklist/whitelist for swapfiles right now.
And how the final form looks like depends on the indirection layer.
As Chris says upthread, virtual swap will be a whole new world. But
unfortunately interfaces are permanent. So I'm sorry, but it's
premature to start tying us to an ABI direction here.
> > We will not be merging a memcg swap tier interface until the swap side
> > has a story for indirection and backend migration.
>
> Regarding this point, is your position that an indirect layer (I see
> this is virtualized swap) must be implemented first?
It is implemented. There have been patches floating around since the
beginning of 2025. Initial proposals date back to 2023.
But we need settled consensus before we can start adding interfaces
that are supposed to control that very layer long-term.
prev parent reply other threads:[~2026-07-23 14:31 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 2:56 [PATCH v10 0/6] mm/swap, memcg: Introduce swap tiers for cgroup based swap control Youngjun Park
2026-07-13 2:56 ` [PATCH v10 1/6] mm: swap: introduce swap tier infrastructure Youngjun Park
2026-07-13 2:56 ` [PATCH v10 2/6] mm: swap: associate swap devices with tiers Youngjun Park
2026-07-13 14:28 ` Usama Arif
2026-07-13 15:20 ` Youngjun Park
2026-07-13 2:56 ` [PATCH v10 3/6] mm: memcontrol: add interface for swap tier selection Youngjun Park
2026-07-13 2:56 ` [PATCH v10 4/6] mm: swap: filter swap allocation by memcg tier mask Youngjun Park
2026-07-13 2:56 ` [PATCH v10 5/6] selftests/mm: add a swap tier configuration test Youngjun Park
2026-07-13 2:56 ` [PATCH v10 6/6] selftests/cgroup: add a swap tier routing test Youngjun Park
2026-07-13 15:50 ` [PATCH v10 0/6] mm/swap, memcg: Introduce swap tiers for cgroup based swap control Yosry Ahmed
2026-07-13 15:57 ` Youngjun Park
2026-07-13 16:01 ` Yosry Ahmed
2026-07-13 16:22 ` Youngjun Park
2026-07-14 20:44 ` Shakeel Butt
2026-07-14 20:52 ` Yosry Ahmed
2026-07-14 22:25 ` Shakeel Butt
2026-07-14 23:09 ` Yosry Ahmed
2026-07-15 5:57 ` Youngjun Park
2026-07-15 16:27 ` Yosry Ahmed
2026-07-15 17:30 ` Chris Li
2026-07-15 20:35 ` Shakeel Butt
2026-07-16 2:02 ` Youngjun Park
2026-07-15 17:27 ` Chris Li
2026-07-15 17:22 ` Chris Li
2026-07-18 15:11 ` Youngjun Park
2026-07-20 18:27 ` Yosry Ahmed
2026-07-22 1:11 ` Shakeel Butt
2026-07-21 18:37 ` Chris Li
2026-07-15 5:45 ` Youngjun Park
2026-07-15 16:25 ` Yosry Ahmed
2026-07-15 21:20 ` Chris Li
2026-07-13 17:02 ` Chris Li
2026-07-13 17:11 ` Yosry Ahmed
2026-07-13 18:34 ` Chris Li
2026-07-13 18:37 ` Yosry Ahmed
2026-07-13 19:38 ` Chris Li
2026-07-13 19:57 ` Yosry Ahmed
2026-07-13 21:49 ` Chris Li
2026-07-13 17:05 ` Chris Li
2026-07-22 13:14 ` Johannes Weiner
[not found] ` <amH9alaO97YqT8pY@yjaykim-PowerEdge-T330>
2026-07-23 14:31 ` Johannes Weiner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amIlqHQ40baRoz3O@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baoquan.he@linux.dev \
--cc=baver.bae@lge.com \
--cc=cgroups@vger.kernel.org \
--cc=chrisl@kernel.org \
--cc=gunho.lee@lge.com \
--cc=h@yjaykim-poweredge-t330 \
--cc=her0gyugyu@gmail.com \
--cc=hyungjun.cho@lge.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=shikemeng@huaweicloud.com \
--cc=taejoon.song@lge.com \
--cc=yosry@kernel.org \
--cc=youngjun.park@lge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox