]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit - kernel/sched/fair.c
sched/numa: Avoid migrating task to CPU-less node
authorHuang Ying <ying.huang@intel.com>
Mon, 14 Feb 2022 12:15:53 +0000 (20:15 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 16 Feb 2022 14:57:53 +0000 (15:57 +0100)
commit5c7b1aaf139dab5072311853bacc40fc3457d1f9
treee25125833c0e36cffb1cde771a7f994f6913aebc
parent0fb3978b0aac3a5c08637aed03cc2d65f793508f
sched/numa: Avoid migrating task to CPU-less node

In a typical memory tiering system, there's no CPU in slow (PMEM) NUMA
nodes.  But if the number of the hint page faults on a PMEM node is
the max for a task, The current NUMA balancing policy may try to place
the task on the PMEM node instead of DRAM node.  This is unreasonable,
because there's no CPU in PMEM NUMA nodes.  To fix this, CPU-less
nodes are ignored when searching the migration target node for a task
in this patch.

To test the patch, we run a workload that accesses more memory in PMEM
node than memory in DRAM node.  Without the patch, the PMEM node will
be chosen as preferred node in task_numa_placement().  While the DRAM
node will be chosen instead with the patch.

Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220214121553.582248-2-ying.huang@intel.com
kernel/sched/fair.c