mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Li Zhe" <lizhe.67@bytedance.com>
To: "Gregory Price" <gourry@gourry.net>
Cc: <akpm@linux-foundation.org>, <david@kernel.org>, <ziy@nvidia.com>,
	 <joshua.hahnjy@gmail.com>, <rakie.kim@sk.com>,
	 <ying.huang@linux.alibaba.com>, <ljs@kernel.org>,
	<mhocko@suse.com>,  <muchun.song@linux.dev>,
	<roman.gushchin@linux.dev>,  <shakeel.butt@linux.dev>,
	<weixugc@google.com>,  <cgroups@vger.kernel.org>,
	<linux-doc@vger.kernel.org>,  <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>
Subject: Re: [RFC 0/2] mm: add source selectors to memory.reclaim
Date: Fri, 23 Oct 2026 14:43:57 +0800	[thread overview]
Message-ID: <ab7aa28c-ccf7-4bad-a871-4b05f7e9bfca@bytedance.com> (raw)
In-Reply-To: <atoZpXaCRc7etPW8@gourry-fedora-PF4VCD3F>

On 10/22/26 10:11 PM, Gregory Price wrote:
> On Thu, Oct 22, 2026 at 05:43:49PM +0800, Li Zhe wrote:
>> On 10/22/26 11:56 AM, Gregory Price (Meta) wrote:
>>
>> So userspace cannot rely on one write to memory.reclaim to produce a
>> final per-node distribution. The intended usage is a feedback loop: the
>> controller observes the memcg's resident distribution, chooses the source
>> nodes it wants to relieve, applies source-scoped reclaim pressure,
>> observes the new distribution, and iterates.
>>
> I think the critical question is what CAN userspace rely on?
>
> We can make a bunch of feedback loop interfaces, but there's no
> guarantee they'll actually be useful.

The reliable part I currently want to claim is narrow: userspace can ask
memory.reclaim to apply reclaim pressure to memcg memory resident on the
selected source nodes. It should not rely on a single write to produce a
final net per-node footprint. The existing memory.reclaim interface is
also a best-effort reclaim request rather than a deterministic placement
primitive; this patch only adds a way to select where that reclaim
pressure is applied.


>
>>> At the very least i think you need to add details in your cover that
>>> demonstrates the process of doing something like per-node resident
>>> ratios, and show that it works as you intend.
>> Agreed. I will update the cover letter to make this model clearer. I
>> will also make clear that source=nodes is not a final net per-node
>> footprint guarantee and does not change memory.reclaim completion
>> accounting.
>>
> To be clear, I think not just making it clearer, but if you can show
> some tests that demonstrate the reliable behavior of the interface
> extension under different scenarios - that would be compelling.


That makes sense. I will run more detailed tests across different
scenarios and include the results in v2.

Thanks,
Zhe

>
> ~Gregory

      reply	other threads:[~2026-10-23  6:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 14:13 Li Zhe
2026-10-19 14:14 ` [RFC 1/2] mm: add source selector " Li Zhe
2026-10-19 14:51   ` Lorenzo Stoakes (ARM)
2026-10-20  8:36     ` Li Zhe
2026-10-19 14:14 ` [RFC 2/2] mm: add tier " Li Zhe
2026-10-19 15:21 ` [RFC 0/2] mm: add source selectors " Joshua Hahn
2026-10-20  9:06   ` Li Zhe
2026-10-19 16:10 ` Gregory Price
2026-10-20 13:01   ` Li Zhe
2026-10-22  3:56     ` Gregory Price (Meta)
2026-10-22  9:43       ` Li Zhe
2026-10-22 14:11         ` Gregory Price
2026-10-23  6:43           ` Li Zhe [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=ab7aa28c-ccf7-4bad-a871-4b05f7e9bfca@bytedance.com \
    --to=lizhe.67@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=rakie.kim@sk.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=weixugc@google.com \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.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

all inboxes | Powered by JetHome®