Re: [RFC PATCH 5/6] sched/uclamp: Remove all uclamp bucket logic

From: Hongyan Xia
Date: Fri Nov 03 2023 - 10:01:37 EST


On 03/11/2023 13:50, Dietmar Eggemann wrote:
On 04/10/2023 11:04, Hongyan Xia wrote:
From: Hongyan Xia <hongyan.xia2@xxxxxxx>

Also rewrite uclamp_update_active() so that the effective uclamp values
are updated every time we change task group properties, change system
defaults or a request is issued from userspace.

Tested it with

# cgcreate -g cpu:/A
# echo $$ > /sys/fs/cgroup/cpu/A/tasks

(1) per-task

# uclampset --pid $$ -m 256 -M 768

(2) per taskgroup

# echo 25.0 > /sys/fs/cgroup/cpu/A/cpu.uclamp.min
# echo 75.0 > /sys/fs/cgroup/cpu/A/cpu.uclamp.max

(3) system-wide

# echo 256 > /proc/sys/kernel/sched_util_clamp_min
# echo 768 > /proc/sys/kernel/sched_util_clamp_max

uclamp_update_active() -> uclamp_update_active_nolock() is called in all
cases.


Thanks for testing!


uclamp_eff_get()'s function header still mentions `clamp bucket index`.

This is indeed confusing. I have changed it from 'clamp bucket index' to just 'uclamp value'.

[...]

[...]