diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2026-03-12 14:59:06 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-06-30 10:56:52 +0200 |
| commit | 80ad6d3338ebe136b0c43c5caa962304a8454e3e (patch) | |
| tree | 65b212faa251458e12e7224a463a57d31cea59de /kernel/sched/debug.c | |
| parent | 4161cb2d867b2210b447afc4a941ab4b96e1bd13 (diff) | |
sched/fair: Add cgroup_mode: up
Instead of calculating the proportional fraction of the group weight for each
CPU, just give each CPU the full measure, ignoring these pesky SMP problems.
This makes the SMP cgroup fraction (F_g_n) equal to 1, and ensures a single
task in a cgroup competes on equal footing to a task in a level above.
However, as already explored, this is not a very good policy because it gets
the SMP weight distribution wrong. Included for completeness.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260605124051.450303977%40infradead.org
Diffstat (limited to 'kernel/sched/debug.c')
| -rw-r--r-- | kernel/sched/debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 507e4866ebb2..53b9e8218a2b 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -634,9 +634,11 @@ static void debugfs_fair_server_init(void) } #ifdef CONFIG_FAIR_GROUP_SCHED -static int cgroup_mode = 0; +static int cgroup_mode = 1; +/* See __sched_cgroup_mode_update(). */ static const char *cgroup_mode_str[] = { + "up", "smp", }; @@ -666,6 +668,7 @@ static ssize_t sched_cgroup_write(struct file *filp, const char __user *ubuf, if (mode < 0) return mode; + __sched_cgroup_mode_update(mode); WRITE_ONCE(cgroup_mode, mode); *ppos += cnt; |
