Re: [PATCH v6 0/3] sched/fair: Limit access to overutilized

From: Valentin Schneider
Date: Thu Mar 14 2024 - 12:47:24 EST


On 07/03/24 14:27, Shrikanth Hegde wrote:
> When running an ISV workload on a large system (240 Cores, SMT8), it was
> observed from perf profile that newidle_balance and enqueue_task_fair
> were consuming more cycles. Perf annotate showed that most of the time
> was spent on accessing overutilized field of root domain. Similar perf profile
> was simulated by making some changes to stress-ng --wait. Both
> newidle_balance and enqueue_task_fair consume close to 5-7%.
>
> Overutilized was added for EAS(Energy aware scheduler) to decide whether
> to do load balance or not. Simultaneous access to overutilized by
> multiple CPUs lead cache invalidations due to true sharing. Updating
> overutilized is not required for non-EAS platforms. Since overutilized and
> overload are part of the same cacheline, there is false sharing as well.
>
> Patch 1/3 - Main patch. It helps in reducing the above said issue.
> Both the functions don't show up in the profile. With patch comparison is in
> changelog. With the patch stated problem in the ISV workload also got
> solved and throughput has improved.
> Patch 2/3 - Code refactoring to use the helper function instead of
> direct access of the field. Keeping this patch so patch 3/3 becomes
> easier to understand. Depends on 1/3.
> Patch 3/3 - Refactoring the code since most of the patterns are observed
> are eas && !overutilzed. Changed the helper function accordingly.
> Depends on 2/3.

Reviewed-by: Valentin Schneider <vschneid@xxxxxxxxxx>