]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Improve consistency of allowed NUMA balance calculations
authorMel Gorman <mgorman@techsingularity.net>
Tue, 8 Feb 2022 09:43:33 +0000 (09:43 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 11 Feb 2022 22:30:08 +0000 (23:30 +0100)
commit46d98e6221341659bb67ea05aa6136e8cc1c1c80
tree732d0ef35fcee7a9e11d652165cb02ef46295879
parente35c528cdabc8498c31276128681e70368289da5
sched/fair: Improve consistency of allowed NUMA balance calculations

There are inconsistencies when determining if a NUMA imbalance is allowed
that should be corrected.

o allow_numa_imbalance changes types and is not always examining
  the destination group so both the type should be corrected as
  well as the naming.
o find_idlest_group uses the sched_domain's weight instead of the
  group weight which is different to find_busiest_group
o find_busiest_group uses the source group instead of the destination
  which is different to task_numa_find_cpu
o Both find_idlest_group and find_busiest_group should account
  for the number of running tasks if a move was allowed to be
  consistent with task_numa_find_cpu

Fixes: fad809d38186 ("sched/numa: Allow a floating imbalance between NUMA nodes")
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20220208094334.16379-2-mgorman@techsingularity.net
kernel/sched/fair.c