From: Shakeel Butt <shakeel.butt@linux.dev>
To: Chris Li <chrisl@kernel.org>
Cc: Yosry Ahmed <yosry@kernel.org>,
Youngjun Park <youngjun.park@lge.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
kasong@tencent.com, hannes@cmpxchg.org, mhocko@kernel.org,
roman.gushchin@linux.dev, muchun.song@linux.dev,
shikemeng@huaweicloud.com, baoquan.he@linux.dev,
baohua@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: Wed, 15 Jul 2026 13:35:56 -0700 [thread overview]
Message-ID: <alfuD8BVdvswr4ch@linux.dev> (raw)
In-Reply-To: <CACePvbVQxvZKa1y4b=mAgdT_uUO=nk4uvuSob3xvW9MZ6OEONg@mail.gmail.com>
On Wed, Jul 15, 2026 at 10:30:26AM -0700, Chris Li wrote:
> On Wed, Jul 15, 2026 at 9:27 AM Yosry Ahmed <yosry@kernel.org> wrote:
> >
> > On Tue, Jul 14, 2026 at 10:58 PM Youngjun Park <youngjun.park@lge.com> wrote:
> > >
> > > On Tue, Jul 14, 2026 at 03:25:40PM -0700, Shakeel Butt wrote:
> > > > On Tue, Jul 14, 2026 at 01:52:14PM -0700, Yosry Ahmed wrote:
> > > > [...]
> > > > > >
> > > > > > Yosry, what is needed to enable zswap as a swap tier? What will be the minimum
> > > > > > requirements for that?
> > > > >
> > > > > From zswap's perspective, we just need to skip zswap is zswap as a
> > > > > tier is disallowed. Could just be a check in zswap_store() similar to
> > > > > the check if zswap is enabled. I am assuming that if a swap tier is
> > > > > disabled, nothing happens to the existing swapped out pages in this
> > > > > tier, but new pages do not get swapped out to it. This is the same
> > > > > behavior that happens if zswap is disabled at runtime.
> > > > >
> > > > > From the tiering perspective, we need to accept "zswap" as a possible
> > > > > tier, or maybe creating it as a tier by default if zswap is configured
> > > > > would be better to avoid handling the case where the user doesn't
> > > > > create a tier for zswap.
> > > >
> > > > Default tier if zswap is configured makes sense. Should zswap be treated as
> > > > having 32767 (or maybe 32768) as priority as it sits infront of all swap
> > > > devices today? Also whichever swap tier has priority range containing 32767,
> > > > will have zswap in it.
> > >
> > > Maybe we can handle zswap as an internally reserved tier which is always
> > > preferred over swap devices.
> > >
> > > I do not think there is a strong use case for grouping zswap together with a
> > > swap device that happens to use the highest priority. Also, using a visible
> > > priority value for zswap may have a small side effect that one priority value
> > > effectively becomes unavailable to users.
> > >
> > > That said, if zswap is represented as a tier, I agree that it should be the
> > > top tier. The exact priority value or whether it is internally reserved should
> > > be adjustable when we implement it.
> >
> > Agreed.
> >
> > [..]
> > > I agree this is reasonable. I can treat the demotion/writeback interaction as
> > > future work and follow up separately.
> > >
> > > > Youngjun, what do you think? Is this reasonable amount of additional work or do
> > > > you envision some complexity here?
> > >
> > > I sent a note with some thoughts about making zswap a tier. Since Chris also
> > > raised concerns around this area, I think it would be better to discuss it a
> > > bit more and evaluate the details carefully.
> > >
> > > At this point, there does not seem to be an immediate use case that requires
> > > zswap tiering in this series. So my preference is to keep this as future work
> > > for now, and follow up with an RFC after verifying that introducing zswap as a
> > > tier on top of this patchset does not cause problems.
> >
> > My main concern is locking ourselves into an implementation without
> > zswap as a tier. One of the appeals of swap tiering to me, from the
> > zswap side, is eventually unifying zswap writeback as part of a more
> > general swap demotion, and unifying zswap controls with more general
> > swap tier controls.
>
> There is nothing locked. The major complexity will come when
> zswap/vswap/Xswap/ghostswap become independent swap devices for swap
> tiers. We are not there yet. But if you want a bool for zswap in swap
> tiers world, we can make it happen trivially.
Yes please let's do this. Can you also please comment on Youngjun's response at
https://lore.kernel.org/all/alcebHobUCUyO70k@yjaykim-PowerEdge-T330/ as well?
next prev parent reply other threads:[~2026-07-15 20:36 UTC|newest]
Thread overview: 32+ 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 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
[not found] ` <alchYX43oV9KybWx@yjaykim-PowerEdge-T330>
2026-07-15 16:27 ` Yosry Ahmed
2026-07-15 17:30 ` Chris Li
2026-07-15 20:35 ` Shakeel Butt [this message]
2026-07-16 2:02 ` Youngjun Park
2026-07-15 17:27 ` Chris Li
2026-07-15 17:22 ` Chris Li
[not found] ` <alcebHobUCUyO70k@yjaykim-PowerEdge-T330>
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
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=alfuD8BVdvswr4ch@linux.dev \
--to=shakeel.butt@linux.dev \
--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=hannes@cmpxchg.org \
--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=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