[tip: sched/core] sched/fair: Change the default cgroup_mode to concur
From: tip-bot2 for Peter Zijlstra
Date: Tue Jun 30 2026 - 05:10:35 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: fb1050ac8e40aaa014291b5b53612d27890c2b09
Gitweb: https://git.kernel.org/tip/fb1050ac8e40aaa014291b5b53612d27890c2b09
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
AuthorDate: Thu, 04 Jun 2026 15:15:51 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 30 Jun 2026 10:56:53 +02:00
sched/fair: Change the default cgroup_mode to concur
For all the reasons described in the preceding patches, the way cgroup
weight is computed is problematic. However, changing it is bound to
also lead to trouble. Esp. since people might have taken to inflating
the weight value where they can.
Since things are configurable, change the default and hope this serves
more people than it hurts, esp. in the longer run.
Specifically, this prepares for a flattened runqueue, where the hierarchical
weight becomes far more important (F_g^d terms), so getting rid of small F_g is
imperative.
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260605124052.080482755%40infradead.org
---
kernel/sched/debug.c | 2 +-
kernel/sched/fair.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 464d0e4..f54e732 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -634,7 +634,7 @@ static void debugfs_fair_server_init(void)
}
#ifdef CONFIG_FAIR_GROUP_SCHED
-static int cgroup_mode = 1;
+static int cgroup_mode = 2;
/* See __sched_cgroup_mode_update(). */
static const char *cgroup_mode_str[] = {
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 4a204eb..1608c01 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4915,7 +4915,7 @@ static long calc_up_shares(struct cfs_rq *cfs_rq)
return READ_ONCE(tg->shares);
}
-DEFINE_STATIC_CALL(calc_group_shares, calc_smp_shares);
+DEFINE_STATIC_CALL(calc_group_shares, calc_concur_shares);
void __sched_cgroup_mode_update(int mode)
{
@@ -4925,10 +4925,10 @@ void __sched_cgroup_mode_update(int mode)
func = &calc_up_shares;
break;
case 1:
- default:
func = &calc_smp_shares;
break;
case 2:
+ default:
func = &calc_concur_shares;
break;
case 3: