Re: [PATCH] sched/uclamp: Introduce a method to transform UCLAMP_MIN into BOOST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/07/2021 09:57, Xuewen Yan wrote:
> From: Xuewen Yan <xuewen.yan@xxxxxxxxxx>
> 
> The uclamp can clamp the util within uclamp_min and uclamp_max,
> it is benifit to some tasks with small util, but for those tasks
> with middle util, it is useless.
> 
> To speed up those tasks, convert UCLAMP_MIN to BOOST,
> the BOOST as schedtune does:

Maybe it's important to note here that schedtune is the `out-of-tree`
predecessor of uclamp used in some Android versions.

> boot = uclamp_min / SCHED_CAPACITY_SCALE;
> margin = boost * (uclamp_max - util)
> boost_util = util + margin;

This is essentially the functionality from schedtune_margin() in
Android, right?

So in your implementation, the margin (i.e. what is added to the task
util) not only depends on uclamp_min, but also on `uclamp_max`?

> Scenario:
> if the task_util = 200, {uclamp_min, uclamp_max} = {100, 1024}
> 
> without patch:
> clamp_util = 200;
> 
> with patch:
> clamp_util = 200 + (100 / 1024) * (1024 - 200) = 280;

The same could be achieved by using {uclamp_min, uclamp_max} = {280, 1024}?

Uclamp_min is meant to be the final `boost( = util + margin)`
information. You just have to set it appropriately to the task (via
per-task and/or per-cgroup interface).

Uclamp_min is for `boosting`, Uclamp max is for `capping` CPU frequency.

[...]



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux