linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Youngjun Park <youngjun.park@lge.com>
To: Kairui Song <ryncsn@gmail.com>
Cc: "Lian Wang (ProcessMission)" <lianux.mm@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Chris Li <chrisl@kernel.org>, Nhat Pham <nphamcs@gmail.com>,
	Baoquan He <baoquan.he@linux.dev>, Barry Song <baohua@kernel.org>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Jihan LIN <linjh22s@gmail.com>, Kunwu Chan <kunwu.chan@linux.dev>,
	Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>,
	linux-hardening@vger.kernel.org
Subject: Re: [RESEND RFC PATCH v2 00/13] mm/swap: introduce per-priority allocation queues
Date: Mon, 7 Sep 2026 10:45:53 +0900	[thread overview]
Message-ID: <ap4XUQtdLIITU5Dt@yjaykim-PowerEdge-T330> (raw)
In-Reply-To: <CAMgjq7Bh0hdVoRcS4xMRL0YG-zmjh-TxyF9xXCmP2MRarAyksQ@mail.gmail.com>

On Fri, Sep 04, 2026 at 09:02:00PM +0800, Kairui Song wrote:
> On Fri, Sep 4, 2026 at 6:12 PM Lian Wang (ProcessMission)
> <lianux.mm@gmail.com> wrote:
> >
> > On Fri, 4 Sep 2026 16:13:10 +0900 Youngjun Park <youngjun.park@lge.com> wrote:
> >
> > > Since tiers come up further down, I'd like to raise a point about the
> > > patch subject line too. As Kairui mentioned in RFC v1 that we would
> > > stay aligned with tiers, would it make sense to frame this RFC as a
> > > per-tier allocation policy (or something along those lines)? Kairui,
> > > what's your opinion?
> >
> > Thanks for the thoughtful feedback and for taking an initial pass over
> > the series.
> >
> > I agree that this queue could naturally become an in-tier allocation
> > policy. For this RFC, I would prefer to keep it separate and scoped to
> > the existing priority semantics while the tier and virtual-swap
> > directions are still being settled. We can revisit the subject and
> > naming once that boundary is clearer.
> 
> Hi All!
> 
> We can start with adpating the default priority if tiering still needs
> more time to land, Not changing the user interface means less risk.
> It's also fine to implement tiering first, there are some other
> blocking issues for tier though.
> 
> With tiering I think we will still need rotation of devices in the
> same priorities / tier. Once tier is ready, we can further extend the
> rotation in the same tier; that's something to discuss.
> 
> >
> > I will also sync with Kairui when he has time. He has several things in
> > flight, but his view on the ownership and framing would be valuable.
> >
> > > Devices assigned to the same tier already share the same priority, so
> 
> Hmm, the current posted tier is a band of priorities. Do you mean that
> when tiering is enabled, devices in the same tier, despite of having
> different priority, will be used equally? And is priority ineffective
> then?

Hello Kairui

Right. My thought is to remove the priority semantics within a tier.

Once devices are grouped into the same tier, allocation within that tier
should be handled by a tier-specific allocation policy.

If users want the traditional priority-based behavior, I think they should
assign devices to different tiers and manage them that way.

For swap devices assigned to the same tier, we can still leave the behavior
flexible through the interfac(they may be treated equally, or priority may
still be considered). However, there should be a default allocation policy.

> > > I don't think the allocation policy needs more than one option for
> > > that case (I can't think of a use case that would need it).
> > >
> > > 1. For legacy swap with no tier configured, define it as a single
> > >    priority treated as one tier.
> > > 2. When priorities match, allocation naturally falls to a single
> > >    policy (not a queue). the concrete policy here is this
> > >    queue-based scheme.
> > > 3. When tiers are enabled, devices previously assigned under legacy
> > >    swap are reassigned to tiers at runtime.
> > >    (This means different swap device on same tier handled like same priority device)
> >
> > These are useful design points. I would like to study the concrete v11
> > before deciding between runtime, boot-time, or compile-time tier
> > assignment. It seems safer not to bind this queue RFC to a permanent
> > tier interface while those semantics and the virtual-swap backend model
> > are still under discussion.
> >
> > > I think this feature will also be needed on the virtualized swap side,
> > > which makes me wonder whether this patch should go back into the swap
> > > tier series instead. Kairui, Lian, what do you think? (Or separately?)
> 
> I'm fine as long as there won't be a regression. I remember V10 of
> tier didn't touch this yet so the regression is limited to tier
> enabled case, so no existing case will experience any issue, that is
> fine. Causing a performance regression for existing usecases is
> usually a bad idea.

Yeah right. will consider regession case.

Thanks


      reply	other threads:[~2026-09-07  1:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29  7:43 [RESEND RFC PATCH v2 00/13] mm/swap: introduce per-priority allocation queues Lian Wang (ProcessMission)
2026-08-29  7:46 ` [RESEND RFC PATCH v2 01/13] mm/swap: remove unused parameter for reading swap header Lian Wang (ProcessMission)
2026-08-29  7:46 ` [RESEND RFC PATCH v2 02/13] mm/swap: slightly cleanup the code for hibernation error handling Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 03/13] mm/swap: cleanup and document swap device availability flag usage Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 04/13] mm/swap: introduce swap device iteration helper Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 05/13] mm/swap: change the swapon lock into a percpu rwsem Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 06/13] mm/swap: remove swapon mutex and update proc reader Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 07/13] mm/swap: consolidate swap inuse accounting helpers Lian Wang (ProcessMission)
2026-08-29  7:47 ` [RESEND RFC PATCH v2 08/13] mm/swap: change back to use each swap device's percpu cluster Lian Wang (ProcessMission)
2026-08-29  7:48 ` [RESEND RFC PATCH v2 09/13] mm/swap: add priority queue for swap device allocation Lian Wang (ProcessMission)
2026-08-29  7:48 ` [RESEND RFC PATCH v2 10/13] mm/swap: remove available list Lian Wang (ProcessMission)
2026-08-29  7:48 ` [RESEND RFC PATCH v2 11/13] mm/swap: bound synchronous discard during allocation Lian Wang (ProcessMission)
2026-08-29  7:48 ` [RESEND RFC PATCH v2 12/13] mm/swap: drop swap active plist Lian Wang (ProcessMission)
2026-08-29  7:48 ` [RESEND RFC PATCH v2 13/13] lib/plist.c: remove requeue function Lian Wang (ProcessMission)
2026-09-01 15:01 ` [RESEND RFC PATCH v2 00/13] mm/swap: introduce per-priority allocation queues Kunwu Chan
2026-09-04  7:13 ` Youngjun Park
2026-09-04 10:08   ` Lian Wang (ProcessMission)
2026-09-04 13:02     ` Kairui Song
2026-09-07  1:45       ` Youngjun Park [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=ap4XUQtdLIITU5Dt@yjaykim-PowerEdge-T330 \
    --to=youngjun.park@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=kunwu.chan@linux.dev \
    --cc=lianux.mm@gmail.com \
    --cc=linjh22s@gmail.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=ryncsn@gmail.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=tglx@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).