Re: [PATCH] sched/uclamp: Fix getting unreasonable ucalmp_max when rq is idle
From: Xuewen Yan
Date: Wed Jun 30 2021 - 08:06:02 EST
On Wed, Jun 30, 2021 at 7:31 PM Valentin Schneider
<valentin.schneider@xxxxxxx> wrote:
>
> On 30/06/21 09:24, Xuewen Yan wrote:
> > On Tue, Jun 29, 2021 at 9:50 PM Valentin Schneider
> > <valentin.schneider@xxxxxxx> wrote:
> >> + min_util = max_t(unsigned long, min_util, READ_ONCE(rq->uclamp[UCLAMP_MIN].value));
> >> + max_util = max_t(unsigned long, max_util, READ_ONCE(rq->uclamp[UCLAMP_MAX].value));
> >
> > Is it necessary to use max_t here? although it is not the main problem...
> >
>
> I got comparison warnings when using a regular max() - the RQ clamp values
> are unsigned int, whereas the local variable is unsigned long.
Yes,I miss the rq clamp value's type.
Thanks!
xuewen