From: Shakeel Butt <shakeel.butt@linux.dev>
To: YoungJun Park <youngjun.park@lge.com>
Cc: Chris Li <chrisl@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Kairui Song <kasong@tencent.com>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>, Baoquan He <bhe@redhat.com>,
Barry Song <baohua@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
gunho.lee@lge.com, taejoon.song@lge.com, austin.kim@lge.com
Subject: Re: [RFC PATCH v2 0/5] mm/swap, memcg: Introduce swap tiers for cgroup based swap control
Date: Tue, 17 Mar 2026 20:54:11 -0700 [thread overview]
Message-ID: <abofwUe6Lz_Qap1x@linux.dev> (raw)
In-Reply-To: <aafe6VXoCLlajp8b@yjaykim-PowerEdge-T330>
Hi YoungJun, sorry for the late response.
On Wed, Mar 04, 2026 at 04:27:37PM +0900, YoungJun Park wrote:
[...]
> > > - You already acknowledged the use-case for assigning
> > > different swap devices to different workloads. Your
> > > objection is specifically about hierarchical parent-child
> > > partitioning. If the interface enforced uniform policy
> > > within a subtree, would that be acceptable?
> >
> > Let's start with that or maybe comeup with concrete examples on how that would
> > look like.
>
> So, just to clarify, are you open to discussing this restricted direction?
I am open to all options. The only thing I am looking for is we have thought
through the pros and cons of all the options and have thought about
extensibility of the interface.
>
> To reiterate, this would mean enforcing a uniform policy for all children
> within a memcg where the swap tier is configured.
Give me an example on how this would look like.
>
> For our use case, this is currently sufficient.
>
> We deal with memcg's tree itself as one workload.
> This workload can use its specific swap device selectively.
> This is my view.
>
> Chris, would you be okay with proceeding in this direction as a starting point?
>
> > Beside, give a bit more thought on potential future features e.g. demotion and
> > reason about how you would incorporate those features.
>
> Regarding demotion (assuming you refer to migration based on swap device
> tiers), I don't foresee issues if we apply tiered swap devices per memcg.
>
> In fact, the 'tier' concept was proposed specifically as an abstraction layer
> to structure hierarchical swap devices. Since the current direction treats it
> as a unified tier view configured by the parent memcg, features like demotion
> should fit naturally.
>
> Regarding future extensibility, I would like to add:
>
> 1. From the memcg perspective:
> Applying memcg in this restricted manner minimizes complexity. While future
> expansions (such as complex tier inheritance rules or handling setting
> differences between parent and child) will require careful discussion, the
> restricted approach avoids immediate conflicts and side effects.
>
> 2. The swap tier abstraction itself:
> The introduction of swap tiers primarily enables swap device assignment.
> However, this abstraction also opens the door for extended use cases such as
> inter-tier migration (demotion), round-robin policies between tiers, tier-based
> VMA swap, or even per-process swap controls in the future.
These are good examples. Just show how the proposed interface will be good for
such features. No need to implement any such feature.
next prev parent reply other threads:[~2026-03-18 3:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 6:52 [RFC PATCH v2 0/5] mm/swap, memcg: Introduce swap tiers for cgroup based swap control Youngjun Park
2026-01-26 6:52 ` [RFC PATCH v2 v2 1/5] mm: swap: introduce swap tier infrastructure Youngjun Park
2026-02-12 9:07 ` Chris Li
2026-02-13 2:18 ` YoungJun Park
2026-02-13 14:33 ` YoungJun Park
2026-01-26 6:52 ` [RFC PATCH v2 v2 2/5] mm: swap: associate swap devices with tiers Youngjun Park
2026-01-26 6:52 ` [RFC PATCH v2 v2 3/5] mm: memcontrol: add interface for swap tier selection Youngjun Park
2026-01-26 6:52 ` [RFC PATCH v2 v2 4/5] mm, swap: change back to use each swap device's percpu cluster Youngjun Park
2026-02-12 7:37 ` Chris Li
2026-01-26 6:52 ` [RFC PATCH v2 v2 5/5] mm, swap: introduce percpu swap device cache to avoid fragmentation Youngjun Park
2026-02-12 6:12 ` [RFC PATCH v2 0/5] mm/swap, memcg: Introduce swap tiers for cgroup based swap control Chris Li
2026-02-12 9:22 ` Chris Li
2026-02-13 2:26 ` YoungJun Park
2026-02-13 1:59 ` YoungJun Park
2026-02-12 17:57 ` Nhat Pham
2026-02-12 17:58 ` Nhat Pham
2026-02-13 2:43 ` YoungJun Park
2026-02-12 18:33 ` Shakeel Butt
2026-02-13 3:58 ` YoungJun Park
2026-02-21 3:47 ` Shakeel Butt
2026-02-21 6:07 ` Chris Li
2026-02-21 17:44 ` Shakeel Butt
2026-02-22 1:16 ` YoungJun Park
2026-03-02 21:27 ` Shakeel Butt
2026-03-04 7:27 ` YoungJun Park
2026-03-18 3:54 ` Shakeel Butt [this message]
2026-03-18 4:57 ` YoungJun Park
2026-03-10 2:14 ` YoungJun Park
2026-03-14 17:32 ` Chris Li
2026-03-18 2:46 ` YoungJun Park
2026-02-21 14:30 ` YoungJun Park
2026-02-23 5:56 ` Shakeel Butt
2026-02-27 2:43 ` YoungJun Park
2026-03-02 14:50 ` YoungJun Park
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=abofwUe6Lz_Qap1x@linux.dev \
--to=shakeel.butt@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=austin.kim@lge.com \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=gunho.lee@lge.com \
--cc=hannes@cmpxchg.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=shikemeng@huaweicloud.com \
--cc=taejoon.song@lge.com \
--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