Re: [LSF/MM/BPF TOPIC] [RFC PATCH 0/4] mm/mempolicy: introduce socket-aware weighted interleave

Gregory Price
2026-03-16T19:45:28Z

On Mon, Mar 16, 2026 at 08:19:32AM -0700, Joshua Hahn wrote:
>
> In that sense I thought the word "prefer" was a bit confusing, since I
> thought it would mean that it would try to fulfill the alloactions
> from within a packet first, then fall back to remote packets if that
> failed. (Or maybe I am just misunderstanding your explanation. Please
> do let me know if that is the case : -) )
>
> If what I understand is the case , I think this is the same thing as
> just restricting allocations to be socket-local. I also wonder if
> this idea applies to other mempolicies as well (i.e. unweighted interleave)
>

I was thinking about this as well, and in my head i think you have to
consider a 2x2 situation

cpuset | multi-socket-cpu single-socket-cpu
==================================================================
single-socket-mem | mem-package mem-package
------------------------------------------------------------------
multi-socket-mem | global global
------------------------------------------------------------------

But I think this reduces to cpuset nodes dictates the weights used -
which should already be the case with the existing code.

I think you are right that we need to be very explicit about the
fallback semantics here - but that may just be a matter of dictating
whether the allocation falls back or prefers direct reclaim to push
pages out of their requested nodes.

~Gregory