From: Andrew Morton <akpm@linux-foundation.org>
To: cuishiwei <cuishw@inspur.com>
Cc: <axelrasmussen@google.com>, <yuanchu@google.com>,
<hannes@cmpxchg.org>, <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: Mon, 8 Sep 2025 18:36:49 -0700 [thread overview]
Message-ID: <20250908183649.da6b77d15c1076e5b69064af@linux-foundation.org> (raw)
In-Reply-To: <20250909012141.1467-1-cuishw@inspur.com>
On Tue, 9 Sep 2025 09:21:41 +0800 cuishiwei <cuishw@inspur.com> 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.
Is this from code inspection? Or is there some workload which benefits
from this change? If the latter, please tell us all about it.
>
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -6706,6 +6706,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg,
> .may_unmap = 1,
> .may_swap = !!(reclaim_options & MEMCG_RECLAIM_MAY_SWAP),
> .proactive = !!(reclaim_options & MEMCG_RECLAIM_PROACTIVE),
> + .no_demotion = 1,
> };
> /*
> * Traverse the ZONELIST_FALLBACK zonelist of the current node to put
> --
> 2.43.0
next prev parent reply other threads:[~2025-09-09 1:36 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 [this message]
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
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=20250908183649.da6b77d15c1076e5b69064af@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=cuishw@inspur.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=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