Skip to content

RFC sched/fair: Remove tunable scaling

Tor Vic lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched/fair: Remove the 'none' and 'linear' scaling of tunablesinclude/linux/sched/sysctl.h kernel/sched/debug.c kernel/sched/fair.c +1 more+1 -880 replies
2/2sched/fair: Remove sched_base_slice scaling altogetherkernel/sched/core.c kernel/sched/fair.c kernel/sched/sched.h+3 -540 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] sched/fair: Remove tunable scaling

This series removes the scaling of tunables, which was introduced around Linux 2.6.33.

I split this into two separate patches:

The first removes the "none" and "linear" scaling which are likely not used much and have limited usefulness, as one can always set sched_base_slice through debugfs.
It keeps the logarithmic scaling which is already the default.

The second removes the entire scaling mecanism and sets a fixed sched_base_slice of 2 milliseconds, a value which has been chosen somewhat arbitrarily.

Currently, the base_slice multiplied by the log2 factor can take the values of 0.7 (1 CPU), 1.4 (2-3 CPUs), 2.1 (4-7 CPUs) and 2.8 msecs (8+ CPUs), so it seems that the new value of 2 msecs is a sane default, which I also use on my consumer x86_64 machines.
However I'll leave that open for discussion. Note that the base_slice value has changed quite often over the years, lastly in 2025 [1].

The series applies to 7.3-rc5, and is build- and boot tested on a measly 2C/4T Skylake machine. I marked it as RFC because I don't know whether these changes are actually wanted by the sched people - and because I'm not a developer. It does however remove quite a lot of code.

[1] commit 2ae891b826958b60919ea21c727f77bcd6ffcc2c

Tor Vic (2):
sched/fair: Remove the 'none' and 'linear' scaling of tunables sched/fair: Remove sched_base_slice scaling altogether

 include/linux/sched/sysctl.h |  7 ----
 kernel/sched/core.c          |  1 -
 kernel/sched/debug.c         | 52 ------------------------
 kernel/sched/fair.c          | 79 ++----------------------------------
 kernel/sched/sched.h         |  5 ---
 5 files changed, 3 insertions(+), 141 deletions(-)
Signature · 1 line
2.55.0