Skip to content

sched/fair: (The return of) misfit task load-balance tweaks

Valentin Schneider lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 18 repliesIn review

v2 -> v3 from the cover letter

--------

o Rebased on top of latest tip/sched/core
o Added test results vs stress-ng.vm-segv

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched/fair: Filter out locally-unsolvable misfit imbalanceskernel/sched/fair.c+45 -185 replies
2/2sched/fair: Relax task_hot() for misfit taskskernel/sched/fair.c+36 -013 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchRik van Riel
1/2R-b
2/2R-b

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/2] sched/fair: (The return of) misfit task load-balance tweaks

Hi folks,

This is the misfit-specific bits I tore out of [1] and that I've been further chewing on.

o Patch 1 pays attention to group vs CPU capacity checks. It's removing some safeguard we had against downmigrations, so it had to grow fatter to compensate for it.
o Patch 2 aligns running and non-running misfit task cache hotness considerations

This is based on top of today's tip/sched/core at:

e0ccd4a3b01 ("rseq: Optimise rseq_get_rseq_cs() and clear_rseq_cs()")

Revisions
=========

v3 -> part 2 v1
---------------

o Removed sg_lb_stats->group_has_misfit_task (Vincent)
o Shoved misfit specific update_sg_lb_stats() work into its own function (Vincent)

o Added migrate_degrades_capacity()
o Made task_hot() tweak depend on
src_grp_type == group_has_spare
rather than
idle != CPU_NOT_IDLE

v2 -> v3
--------

o Rebased on top of latest tip/sched/core
o Added test results vs stress-ng.vm-segv

v1 -> v2
--------

o Collected Reviewed-by
o Minor comment and code cleanups

o Consolidated static key vs SD flag explanation (Dietmar)

Note to Vincent: I didn't measure the impact of adding said static key to load_balance(); I do however believe it is a low hanging fruit. The wrapper keeps things neat and tidy, and is also helpful for documenting the intricacies of the static key status vs the presence of the SD flag in a CPU's sched_domain hierarchy.

o Removed v1 patch 4 - root_domain.max_cpu_capacity is absolutely not what I had convinced myself it was.
o Squashed capacity margin usage with removal of group_smaller_{min, max}_capacity() (Vincent)
o Replaced v1 patch 7 with Lingutla's can_migrate_task() patch [2]
o Rewrote task_hot() modification changelog

Links
=====

[1]: http://lore.kernel.org/r/[email protected]
[2]: http://lore.kernel.org/r/[email protected]

Cheers,
Valentin

Valentin Schneider (2):
sched/fair: Filter out locally-unsolvable misfit imbalances sched/fair: Relax task_hot() for misfit tasks

 kernel/sched/fair.c | 99 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 81 insertions(+), 18 deletions(-)

--
2.25.1