[PATCH v3 6/7] sched/fair: Change the default cgroup_mode to concur
From: Peter Zijlstra
Date: Fri Jun 05 2026 - 08:51:02 EST
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>
---
kernel/sched/debug.c | 2 +-
kernel/sched/fair.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -635,7 +635,7 @@ static void debugfs_fair_server_init(voi
}
#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[] = {
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4921,7 +4921,7 @@ static long calc_up_shares(struct 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)
{
@@ -4931,10 +4931,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: