From: "Li Zhe" <lizhe.67@bytedance.com>
To: "Gregory Price" <gourry@gourry.net>
Cc: <akpm@linux-foundation.org>, <david@kernel.org>, <ljs@kernel.org>,
<joshua.hahnjy@gmail.com>, <ziy@nvidia.com>, <mingo@redhat.com>,
<peterz@infradead.org>, <mgorman@suse.de>, <riel@redhat.com>,
<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <vschneid@redhat.com>,
<kprateek.nayak@amd.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH 4/6] sched/numa: make free-space tiering promotion bypass configurable
Date: Thu, 15 Oct 2026 12:09:17 +0800 [thread overview]
Message-ID: <a01ccd5a-f443-49bb-a615-5712881ee7cd@bytedance.com> (raw)
In-Reply-To: <as-AV04p-AZ45-mw@gourry-fedora-PF4VCD3F>
On 10/14/26 9:16 PM, Gregory Price wrote:
> On Wed, Oct 14, 2026 at 05:43:45PM +0800, Li Zhe wrote:
>> Memory tiering normally promotes any recently accessed slow-tier page if
>> the target fast-tier node has enough free space. This preserves the
>> existing policy of filling available fast memory before relying on
>> hotness and rate-limit control.
>>
>> That is not always the desired policy. Some workloads may intentionally
>> place memory across CXL-attached memory and DRAM to use aggregate memory
>> bandwidth. With the free-space bypass, cold one-shot accesses and bursts
>> of hot accesses can refill the fast tier and pull the workload away from
>> that distribution whenever DRAM has free space.
>>
>> Add kernel.numa_balancing_promote_free_space_bypass. It defaults to 1,
>> preserving the existing behavior. When cleared, enough free space in the
>> target fast-tier node no longer bypasses the normal hotness and
>> rate-limit controls.
>>
> A global switch for this is a poor solution for this problem.
>
> Also, if the memory was spread out intentionally, it presumably was done
> so with a memory policy. In that case, if the user did not set
> MPOL_F_NUMA_BALANCING - that spread is already protected because the
> mempolicy overrides the numa balancing fault and no migration occurs.
>
> I don't think this is the right direction.
I agree that a workload which wants to fully preserve its initial spread
can avoid MPOL_F_NUMA_BALANCING.
The case I had in mind is different: the workload wants to opt in to
tiering, so hot and cold pages can still be adjusted, while keeping the
DRAM/CXL distribution meaningful. This is the same kind of use case I
was trying to describe for weighted interleave plus NUMA balancing:
https://lore.kernel.org/all/20260930072617.64665-1-lizhe.67@bytedance.com/
With the current free-space bypass, opting in to tiering can promote
recently accessed slow-tier pages without the normal hotness and
rate-limit checks whenever the top tier has enough free space. That makes
it hard to combine weighted or interleaved placement with tiering
feedback.
That said, I see your point that a global switch is coarse. Maybe this
should be controlled by a per-workload policy instead. For example,
Yafang's RFC for BPF-based per-cgroup NUMA balancing mode selection seems
related:
https://lore.kernel.org/lkml/3eda489898ebf7c848ce61760af745d9@kernel.org/
Would a per-cgroup control for this promotion behavior be a more
reasonable direction than a global sysctl?
Thanks,
Zhe
>
> ~Gregory
next prev parent reply other threads:[~2026-10-15 4:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 9:43 [PATCH 0/6] sched/numa: fix several NUMA balancing issues Li Zhe
2026-10-14 9:43 ` [PATCH 1/6] sched/numa: clear fault locality state on execve Li Zhe
2026-10-14 13:02 ` Gregory Price
2026-10-15 3:41 ` Li Zhe
2026-10-14 9:43 ` [PATCH 2/6] sched/numa: fix scan-period ratio denominator checks Li Zhe
2026-10-14 12:56 ` Gregory Price
2026-10-15 3:49 ` Li Zhe
2026-10-14 9:43 ` [PATCH 3/6] sched/numa: fix scan-period adjustment for shared faults Li Zhe
2026-10-14 13:12 ` Gregory Price
2026-10-15 11:39 ` Li Zhe
2026-10-15 16:02 ` Gregory Price
2026-10-14 9:43 ` [PATCH 4/6] sched/numa: make free-space tiering promotion bypass configurable Li Zhe
2026-10-14 13:16 ` Gregory Price
2026-10-15 4:09 ` Li Zhe [this message]
2026-10-14 9:43 ` [PATCH 5/6] sched/numa: do not feed tiering promotions into task placement stats Li Zhe
2026-10-14 13:26 ` Gregory Price
2026-10-15 5:07 ` kernel test robot
2026-10-15 5:07 ` kernel test robot
2026-10-14 9:43 ` [PATCH 6/6] sched/numa: ignore preferred nodes without normal balancing Li Zhe
2026-10-14 13:30 ` Gregory Price
2026-10-15 11:44 ` Li Zhe
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=a01ccd5a-f443-49bb-a615-5712881ee7cd@bytedance.com \
--to=lizhe.67@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=bsegall@google.com \
--cc=david@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®