Re: [PATCH 0/3] mm/mempolicy: add per-cgroup weighted interleave controls

From: Tejun Heo

Date: Tue Nov 03 2026 - 11:12:16 EST


Hello, Zhe.

On Tue, Nov 03, 2026 at 08:28:13PM +0800, Li Zhe wrote:
> MPOL_WEIGHTED_INTERLEAVE currently has one system-wide weight table,
> configured through sysfs or auto-derived from node bandwidth. This series
> adds an optional BPF control plane that lets privileged BPF syscall
> programs install manual weighted-interleave overrides for individual
> cgroups.
...

I don't think this has much to do with cgroups. Weighted interleave is
already a per-thread/per-VMA policy chosen through set_mempolicy() and
mbind(), and the weights are parameters of that policy. I think this
should be tied to the memory policy instead. This is different from
the per-cgroup NUMA balancing kfuncs. NUMA balancing has no per-task
opt-in and acts on memory with no task context.

Gregory Price's mempolicy2 series already proposed set_mempolicy2() and
mbind2() with task-local weights:

https://lore.kernel.org/all/20240103224209.2541-1-gregory.price@xxxxxxxxxxxx/

Thanks.

--
tejun