Skip to content

RFC sched: Disabled LB_BIAS with full dynticks

Frederic Weisbecker lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sched: Disable lb_bias feature for full dyntickskernel/sched/fair.c kernel/sched/features.h+14 -21 reply
2/4sched: Consolidate nohz cpu load prelude codekernel/sched/proc.c+14 -261 reply
3/4sched: Conditionally build decaying cpu load statskernel/sched/proc.c kernel/sched/sched.h+32 -170 replies
4/4sched: Consolidate open coded preemptible() checkskernel/context_tracking.c kernel/sched/core.c+2 -53 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPaul E. McKenney
1/4A-b
2/4
3/4
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 [RFC PATCH 0/4] sched: Disabled LB_BIAS with full dynticks

Hi,

So I've been looking at update_cpu_load_active(), update_idle_cpu_load() and update_cpu_load_nohz() to conclude that dynticks are well handled by decay_load_missed() which catch up with the missed nohz load.

However decay_load_missed() seem to always assume that the nohz load was zero. So it works well for dynticks idle but it doesn't seem to fit well for full dynticks. (My understanding of the maths involved in decay_load_missed might be wrong though, so correct me if
I brainfarted).

Moreover even if we had a mathematical solution to catch up with full dynticks load like decay_load_missed() does for dynticks idle, we would need to be able to perform the update from remote readers such as source_load() or target_load(), which is another problem on its own.

So this patchset propose a simple solution as a start: disable LB_BIAS sched feature in full dynticks. LB_BIAS is the only user of these decayed cpu load stats.

LB_BIAS sched feature is quite an obfuscated feature though
so I'm not sure about all the implication of that. It seems to be about the selection of CPU targets from the different enqueuing places that each have a different timeslice zooming weight while observing a target load. And that weight influence the CPU selection.

May be for HPC loads that run only one task per CPU it doesn't matter much. But some other workloads may suffer from that, especially when full dynticks will be usable when more than a single task compete on the CPUs.

Anyway at least this patchset can help starting a discussion.

Those who want to play can fetch from:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
sched/core

Thanks,
Frederic
---

Frederic Weisbecker (4):
sched: Disable lb_bias feature for full dynticks
sched: Consolidate nohz cpu load prelude code
sched: Conditionally build decaying cpu load stats
sched: Consolidate open coded preemptible() checks

 kernel/context_tracking.c |    3 +-
 kernel/sched/core.c       |    4 +--
 kernel/sched/fair.c       |   13 ++++++-
 kernel/sched/features.h   |    3 ++
 kernel/sched/proc.c       |   75 ++++++++++++++++++++++-----------------------
 kernel/sched/sched.h      |    4 ++
 6 files changed, 57 insertions(+), 45 deletions(-)