lkml.org 
[lkml]   [2023]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 6/6] sched/uclamp: Simplify uclamp_eff_value()
From
On 04/10/2023 11:04, Hongyan Xia wrote:
> From: Hongyan Xia <hongyan.xia2@arm.com>
>
> The commit
>
> sched: Remove all uclamp bucket logic
>
> removes uclamp_{inc/dec}() functions, so now p->uclamp contains the

s/uclamp_{inc/dec}/uclamp_rq_{inc/dec}

> correct values all the time after a update_uclamp_active() call, and

s/update_uclamp_active()/uclamp_update_active()

> there's no need to toggle the boolean `active` after an update. As a
> result, this function is fairly simple now and can live as a static
> inline function.

[...]

> -unsigned long uclamp_eff_value(struct task_struct *p, enum uclamp_id clamp_id)
> -{
> - if (!uclamp_is_used() || !p->uclamp[clamp_id].active)
> - return uclamp_none(clamp_id);
> -
> - return p->uclamp[clamp_id].value;
> -}
> -

Is there still a need for p->uclamp[clamp_id].active ? Does
uclamp_eff_value() ever get called with !active ?

And why do we have to set uclamp default values in case (!used ||
!active)? Shouldn't they be set already in this situation?

[...]

\
 
 \ /
  Last update: 2023-11-20 13:47    [W:0.194 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site