Re: [RFC PATCH] sched_ext: Drive the NUMA balancing scan for SCX tasks

From: Vladimir Vdovin

Date: Fri Oct 02 2026 - 11:13:26 EST


Hi Andrea,

On Fri, Oct 02, 2026, Andrea Righi wrote:
> Thanks for looking at this! I actually have a patch series in my backlog to
> introduce NUMA-balancing support in sched_ext. It makes NUMA hinting scans
> opt-in for BPF schedulers and exposes a task's preferred NUMA node to BPF.

That is great news, thanks. My patch was only a small sketch to show the
problem, so I am happy to leave it at that and follow your series
instead.

Opt-in scanning plus the preferred node exposed to BPF sounds like what
I was looking for. My scheduler runs on KVM hypervisors and reads
p->numa_preferred_nid to choose a home node for each vCPU thread,
falling back to the thread group's majority when a task has none. Under
SCX that value stops being updated, which is how I noticed.

> It also lets a BPF scheduler set a per-task memory target, which NUMA balancing
> can use when migrating pages after hinting faults.

This part sounds interesting too. Guests that span two nodes are the
hard case for me: today I can only follow the memory, I cannot ask for
it to follow the vCPUs.

> I can probably send the patch series at this point, it's not completely
> well-tested, but it might be useful to have it on the list, so that we can start
> discussing and improving it. I'll keep you in the loop.

Thanks, I will be watching for it. If it is of any use, I can try it on
a few hypervisors (2- and 4-node hosts) and share numbers for scan rate,
hint faults and time spent on the preferred node.

Thanks,
Vladimir