[lkml]   [2019]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 1/4] sched/uclamp: Make uclamp_util_*() helpers use and return UL values
On 04/12/2019 15:22, Vincent Guittot wrote:
>> @@ -2303,15 +2303,15 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) {}
>> unsigned int uclamp_eff_value(struct task_struct *p, enum uclamp_id clamp_id);
> Why not changing uclamp_eff_value to return unsigned long too ? The
> returned value represents a utilization to be compared with other
> utilization value

IMO uclamp_eff_value() is a simple accessor to uclamp_se.value
(unsigned int), which is why I didn't want to change its return type.
I see it as being the task equivalent of rq->uclamp[clamp_id].value, IOW
"give me the uclamp value for that clamp index". It just happens to be a
bit more intricate for tasks than for rqs.

uclamp_util() & uclamp_util_with() do explicitly return a utilization,
so here it makes sense (in my mind, that is) to return UL.

 \ /
  Last update: 2019-12-04 17:04    [W:0.080 / U:8.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site