Re: [PATCH] mm/numa_balancing: allow migrate on protnone reference with MPOL_WEIGHTED_INTERLEAVE policy
From: David Hildenbrand (Arm)
Date: Thu Oct 01 2026 - 06:55:35 EST
On 9/30/26 15:40, Gregory Price wrote:
> On Wed, Sep 30, 2026 at 02:32:16PM +0200, David Hildenbrand (Arm) wrote:
>>>
>>> Right, but you're requesting this configuration. If you didn't set
>>> F_NUMA_BALANCING then you get the existing semantics.
>>>
>>> In the existing semantics, if we're INTERLEAVE and WEIGHTED_INTERLEAVE
>>> we just always say "no tiering for you".
>>>
>>> But as an opt-in option? I don't quite see the argument for saying
>>> interleaved regions (or tasks) to be opted-out if the user asks for it -
>>> that just seems like an arbitrary limitation.
>>
>> Just to be clear, what I am saying is: the proposed semantics are inconsistent
>> (weighted when mechanism A honors them and mechanism B doesn't honor them), but
>> once we set these semantics in stone like that, we cannot easily change them
>> later because some user might depend on that behavior.
>>
>> So you'll need yet another flag to say "NUMA balancing really also honors the
>> weights". And that's where it all gets ugly.
>>
>
> I would agree with you if demotion didn't entirely ignoring mempolicy.
>
> On a tiered system, mempolicy *only* applies to initial (or fault-in)
> placement, and otherwise is more or less entirely ignored. This is
> a case where it's not ignored - which is actually inconsistent with
> the rest of the tiering tools (demotion, damon).
>
> This is why I said this distinction may only make sense in TIERING
> mode, while in NORMAL mode you likely just want to fault it back to
> its original interleave location.
>
> Also file interleave (indexed by offset) vs task (counter-incremented)
> policies are affected by these changes very differently, which I asked
> for some thought on.
>
> As tiering develops, the less I think task-mempolicy as a whole makes
> much sense (because it's at-best advisory).
Fully agreed to that. I even struggle to understand how an initial placement
using the weighted policy really fits into that picture.
--
Cheers,
David