Re: [PATCH] sched/fair: Prevent cpu_busy_time from exceeding actual_cpu_capacity
From: Qais Yousef
Date: Tue Jun 18 2024 - 10:59:18 EST
On 06/17/24 12:03, Qais Yousef wrote:
> > Sorry, I miss the "fits_capacity() use capacity_of()", and without
> > uclamp_max, the rd is over-utilized,
> > and would not use feec().
> > But I notice the uclamp_max, if the rq's uclamp_max is smaller than
> > SCHED_CAPACITY_SCALE,
> > and is bigger than actual_cpu_capacity, the util_fits_cpu() would
> > return true, and the rd is not over-utilized.
> > Is this setting intentional?
>
> Hmm. To a great extent yes. We didn't want to take all types of rq pressure
> into account for uclamp_max. But this corner case could be debatable.
>
> Is this the source of your problem? If you change util_fits_cpu() to return
> false here, would this fix the problem you're seeing?
FWIW, if this happens due to uclamp_max, then this patch to do the capping is
still needed.
I think it's good to understand first how we end up in feec() when a CPU is
supposed to be overutlized. uclamp_max is the only way to override this
decision AFAICT..