]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit - kernel/sched/fair.c
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)
commit2cfb7a1b031b0e816af7a6ee0c6ab83b0acdf05a
tree732d0ef35fcee7a9e11d652165cb02ef46295879
parent889c5d60fbcf332c8b6ab7054d45f2768914a375
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: 7d2b5dd0bcc4 ("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