]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit97f0e402931cac74bd4d215ddb1a0d72938b16f3
treee25125833c0e36cffb1cde771a7f994f6913aebc
parent4d49a97165cabe74d5c9a1ccac1b8123415d9312
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