From: cuishiwei <cuishw@inspur.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: cuishiwei <cuishw@inspur.com>, Michal Hocko <mhocko@suse.com>,
<akpm@linux-foundation.org>, <axelrasmussen@google.com>,
<yuanchu@google.com>, <weixugc@google.com>, <david@redhat.com>,
<zhengqi.arch@bytedance.com>, <shakeel.butt@linux.dev>,
<lorenzo.stoakes@oracle.com>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] disable demotion during memory reclamation
Date: Wed, 10 Sep 2025 14:36:40 +0800 [thread overview]
Message-ID: <20250910063643.2323-1-cuishw@inspur.com> (raw)
In-Reply-To: <20250909144531.GA1474@cmpxchg.org>
On Tue, 9 Sep 2025 15:45:31 +0100 Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Tue, Sep 09, 2025 at 09:40:51AM +0200, Michal Hocko wrote:
> > On Tue 09-09-25 09:21:41, cuishiwei wrote:
> > > When a memory cgroup exceeds its memory limit, the system reclaims
> > > its cold memory.However, if /sys/kernel/mm/numa/demotion_enabled is
> > > set to 1, memory on fast memory nodes will also be demoted to slow
> > > memory nodes.
> > >
> > > This demotion contradicts the goal of reclaiming cold memory within
> > > the memcg.At this point, demoting cold memory from fast to slow nodes
> > > is pointless;it doesn't reduce the memcg's memory usage. Therefore,
> > > we should set no_demotion when reclaiming memory in a memcg.
> >
> > We have discussed this in the past and it is my recollection that we
> > have concluded that demotion is a part of proper aging and therefore it
> > should be done during the limit reclaim.
>
> Yes, thanks. This is intentional. Please see 3f1509c57b1b ("Revert
> "mm/vmscan: never demote for memcg reclaim"") for more details.
Thank you for the guidance. It seems the original processing logic was sound.
Sent using hkml (https://github.com/sjp38/hackermail)
prev parent reply other threads:[~2025-09-10 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 1:21 cuishiwei
2025-09-09 1:36 ` Andrew Morton
2025-09-09 2:40 ` cuishiwei
2025-09-09 7:40 ` Michal Hocko
2025-09-09 14:45 ` Johannes Weiner
2025-09-10 6:36 ` cuishiwei [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=20250910063643.2323-1-cuishw@inspur.com \
--to=cuishw@inspur.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.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®