sched/topology: Skip updating masks for non-online nodes
authorValentin Schneider <valentin.schneider@arm.com>
Wed, 18 Aug 2021 07:43:33 +0000 (13:13 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Aug 2021 10:32:57 +0000 (12:32 +0200)
commit0083242c93759dde353a963a90cb351c5c283379
tree04bca15e37cee34811bc8b7e871cc2dbf083f223
parent746f5ea9c4283d98353c1cd41864aec475e0edbd
sched/topology: Skip updating masks for non-online nodes

The scheduler currently expects NUMA node distances to be stable from
init onwards, and as a consequence builds the related data structures
once-and-for-all at init (see sched_init_numa()).

Unfortunately, on some architectures node distance is unreliable for
offline nodes and may very well change upon onlining.

Skip over offline nodes during sched_init_numa(). Track nodes that have
been onlined at least once, and trigger a build of a node's NUMA masks
when it is first onlined post-init.

Reported-by: Geetika Moolchandani <Geetika.Moolchandani1@ibm.com>
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210818074333.48645-1-srikar@linux.vnet.ibm.com
kernel/sched/topology.c