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@infradead.org>
Link: https://patch.msgid.link/20260605124052.080482755%40infradead.org
This commit is contained in:
Peter Zijlstra
2026-06-04 15:15:51 +02:00
parent 507f910a4e
commit fb1050ac8e
2 changed files with 3 additions and 3 deletions

View File

@@ -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[] = {

View File

@@ -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: