[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66e62c6f-b585-47a7-a519-9a8feea7176c@arm.com>
Date: Fri, 3 Nov 2023 14:50:36 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Hongyan Xia <Hongyan.Xia2@....com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Juri Lelli <juri.lelli@...hat.com>
Cc: Qais Yousef <qyousef@...alina.io>,
Morten Rasmussen <morten.rasmussen@....com>,
Lukasz Luba <lukasz.luba@....com>,
Christian Loehle <christian.loehle@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 5/6] sched/uclamp: Remove all uclamp bucket logic
On 04/10/2023 11:04, Hongyan Xia wrote:
> From: Hongyan Xia <hongyan.xia2@....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;
> -}
[...]
Powered by blists - more mailing lists