Messages in this thread Patch in this message | | | Date | Fri, 3 Nov 2023 14:50:36 +0100 | Subject | Re: [RFC PATCH 5/6] sched/uclamp: Remove all uclamp bucket logic | From | Dietmar Eggemann <> |
| |
On 04/10/2023 11:04, Hongyan Xia wrote: > From: Hongyan Xia <hongyan.xia2@arm.com> > > 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.
[...]
uclamp_eff_get()'s function header still mentions `clamp bucket index`.
> @@ -1542,196 +1485,24 @@ uclamp_eff_get(struct task_struct *p, enum uclamp_id clamp_id) > > unsigned long uclamp_eff_value(struct task_struct *p, enum uclamp_id clamp_id) > { > - struct uclamp_se uc_eff; > - > - /* Task currently refcounted: use back-annotated (effective) value */ > - if (p->uclamp[clamp_id].active) > - return (unsigned long)p->uclamp[clamp_id].value; > - > - uc_eff = uclamp_eff_get(p, clamp_id); > - > - return (unsigned long)uc_eff.value; > -}
[...]
| |