Re: [RFC PATCH v3 5/6] sched/uclamp: Simplify uclamp_eff_value()

From: Dietmar Eggemann
Date: Sun May 26 2024 - 18:53:17 EST


On 07/05/2024 14:50, Hongyan Xia wrote:

[...]

> +static inline unsigned long uclamp_eff_value(struct task_struct *p,
> + enum uclamp_id clamp_id)
> +{
> + if (uclamp_is_used() && p->uclamp[clamp_id].active)
> + return p->uclamp[clamp_id].value;
> +
> + if (clamp_id == UCLAMP_MIN)
> + return 0;
> +
> + return SCHED_CAPACITY_SCALE;

Why not keep using 'return uclamp_none(clamp_id)' here?

[...]