On 2/28/24 9:28 PM, Pierre Gondois wrote:
Hi Pierre, Thanks for taking a look.
It is nice to avoid calling effective_cpu_util() through the followingI didnt want to put a EAS check in cpu_overutilized as it could be useful
when EAS is not enabled:
I think we are avoiding calling cpu_overutilized except in update_sg_lb_stats.
function in non-EAS cases in future. calling cpu_overutilized alone doesnt
do any access to root_domain's overutilized field. So we are okay w.r.t to
cache issues.
But we will do some extra computation currently and then not use it if it
Non-EAS case in update_sg_lb_stats
Would something like this makes sense?
@@ -9925,7 +9925,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
if (nr_running > 1)
*sg_status |= SG_OVERLOAD;
- if (cpu_overutilized(i))
+ if (sched_energy_enabled() && cpu_overutilized(i))
*sg_status |= SG_OVERUTILIZED;
I didnt find how would util_fits_cpu ends up calling effective_cpu_util.
Could you please elaborate?
cpu_overutilized()
\-util_fits_cpu()
\- ...
\-effective_cpu_util()