Re: [PATCH 4/6] sched/numa: make free-space tiering promotion bypass configurable
From: Li Zhe
Date: Thu Oct 15 2026 - 00:11:20 EST
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@xxxxxxxxxxxxx/
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@xxxxxxxxxx/
Would a per-cgroup control for this promotion behavior be a more
reasonable direction than a global sysctl?
Thanks,
Zhe
>
> ~Gregory