Re: [PATCH] mm/numa_balancing: allow migrate on protnone reference with MPOL_WEIGHTED_INTERLEAVE policy
From: David Hildenbrand (Arm)
Date: Wed Sep 30 2026 - 07:39:37 EST
On 9/30/26 09:26, Li Zhe wrote:
> MPOL_WEIGHTED_INTERLEAVE is useful on tiered-memory systems because it
> can seed a workload's new allocations across fast memory and slower
> capacity memory according to a configured ratio.
>
> That initial placement is useful for workload managers and orchestration
> systems. They can take the amount of fast memory and slower capacity
> memory on a machine into account before starting a workload, and choose a
> weighted policy that seeds the workload across the tiers at allocation
> time. This avoids starting from an all-fast or all-slow placement and
> then relying on promotion or demotion to reshape a large working set.
>
> After those pages have been placed, however, the policy cannot currently
> opt in to migrate-on-fault placement. set_mempolicy() and mbind()
> reject MPOL_WEIGHTED_INTERLEAVE when MPOL_F_NUMA_BALANCING is specified,
> so memory tiering cannot promote hot pages that were initially placed on
> the slower nodes by the weighted policy.
>
> Initial placement is only a starting point. Pages initially allocated on
> fast memory are not necessarily the long-term hot pages, and pages
> initially allocated on slower memory may become hot as the workload's hot
> set changes. The policy therefore needs to be able to combine weighted
> initial placement with memory tiering's NUMA fault based hot-page
> promotion.
Ok, so memory allocation will respect the weights but balancing will ignore
them? That really sounds rather odd to me.
And I assume that was the reason why we might have disallowed the combination:
it turns a weighted mechanism into an unweighted mechanism.
So are we really sure these semantics that you would essentially set in stone
here are the semantics we want? (ignoring weights)
--
Cheers,
David