Skip to content

Throttle select_idle_sibling when a target domain is overloaded

Mel Gorman lkml oe-lkp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched/fair: Track efficiency of select_idle_siblingkernel/sched/debug.c kernel/sched/fair.c kernel/sched/sched.h +1 more+29 -32 replies
2/4sched/fair: Track efficiency of task recent_used_cpukernel/sched/debug.c kernel/sched/fair.c kernel/sched/sched.h +1 more+20 -121 reply
3/4sched/fair: Clear SMT siblings after determining the core is not idlekernel/sched/fair.c+2 -11 reply
4/4sched/fair: Track possibly overloaded domains and abort a scan if necessaryinclude/linux/sched/topology.h kernel/sched/fair.c kernel/sched/features.h+65 -46 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchValentin Schneider
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Throttle select_idle_sibling when a target domain is overloaded

This is a follow-on from the CPU/NUMA load balancer reconcilation after I noticed that select_idle_sibling() was doing excessive work. It was originally part of a larger series that merged select_idle_core, select_idle_sibling and select_idle_cpu as a single pass. Unfortunately, fixes have invalidated the tests multiple times so this series covers only one part for now as the tests are extremely time-consuming.

tip/sched/core as of March 13th was used as the baseline with "sched/fair:
fix condition of avg_load calculation" applied which was just picked up by tip at the time of writing.

Patches 1-2 add schedstats to track the efficiency of select_idle_sibling(). Ordinarily they are disabled and are only really of use to a kernel developer. However, I find them more practical to work with than perf.

Patch 3 is a trivial micro-optimisation that avoids clearing part of a cpumask if a core has been found.

Patch 4 tracks whether a domain appeared to be overloaded during select_idle_cpu() so that future scans can abort early if necessary. This reduces the number of runqueues that are scanned uselessly when a domain is overloaded.

 include/linux/sched/topology.h |   1 +
 kernel/sched/debug.c           |   6 +++
 kernel/sched/fair.c            | 103 +++++++++++++++++++++++++++++++++++------
 kernel/sched/features.h        |   3 ++
 kernel/sched/sched.h           |   8 ++++
 kernel/sched/stats.c           |   9 ++--
 6 files changed, 113 insertions(+), 17 deletions(-)
Signature · 1 line
2.16.4