Re: [RFC PATCH v2 17/23] sched/fair: Fine-granularity NUMA balancing
From: Peter Zijlstra
Date: Tue Sep 01 2026 - 09:01:06 EST
On Fri, Aug 28, 2026 at 10:07:31AM +0800, Jianyong Wu wrote:
> NUMA balancing currently consists of two coupled components:
> task migration and page migration. These two mechanisms work in tandem.
> However, task migration may conflict with other subsystems such as CAS,
> which aggregates tasks solely via task migration. Conflicts arise when
> both CAS and NUMA balancing are enabled simultaneously.
>
> This patch addresses the problem by introducing a fine-grained NUMA
> balancing mechanism, allowing task migration and page migration to
> be enabled or disabled independently.
Sorry, but this doesn't make sense.
At every point NUMA migration should take precedence over LLC. The
remote node penalty is much greater than the 'other' llc penalty.
It is always beneficial to get tasks placed near the memory, and if
tasks cannot be so moved, to move memory near to where the tasks are.
As a secondary concern, it is beneficial to keep tasks constrained to a
minimal set of LLCs inside this node.
Disabling page-migration or numa task-migration separately completely
wrecks things and you might as well just disable NUMA balancing.
Now, if the process spans multiple nodes we should go do the same again
as this patch set does for llc, spread/interleave over the minimal set
of nodes that do fit.