summaryrefslogtreecommitdiff
path: root/kernel/sched/debug.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2026-03-12 16:04:18 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-06-30 10:56:52 +0200
commit5c0b58bd1c9f09c4e9363665702c82694c6ee7a0 (patch)
treed7c710d1b711262e1d4ba09d6fc93c32fd086ca1 /kernel/sched/debug.c
parent90ac22ffef48dbc6e7561434b6e01753a859bb51 (diff)
sched/fair: Add cgroup_mode: concur
Improve upon the previous scheme ("max") by no longer assuming maximal concurrency. Instead scale by: 'min(nr_tasks, nr_cpus)'. This handles the low concurrency cases more gracefully: F_g_n' = min(M, N) * F_g_n Notably this is the first mode where: avg(F_g_n) = 1 In the single task case it reduces to ("smp") and then it nicely scales up until it hits N, where it behaves like ("max"). This is no longer clipped at nice -20. Strictly speaking it isn't different from the normal SMP scenario where all tasks are extremely unbalanced. There are no unnatural inflations in this scheme. The meaning of "cpu.weight" would be: weight per active CPU. NOTE: Compute the group wide number of tasks by extending the tg->load_avg computation with tg->runnable_avg, since cfs_rq->runnable_avg is based on cfs_rq->h_nr_running. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260605124051.740585993%40infradead.org
Diffstat (limited to 'kernel/sched/debug.c')
-rw-r--r--kernel/sched/debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 84e0ac40b6c0..a5e3f8a365e6 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -640,6 +640,7 @@ static int cgroup_mode = 1;
static const char *cgroup_mode_str[] = {
"up",
"smp",
+ "concur",
"max",
};