Re: [PATCH v2][RFC] sched/fair: Change SIS_PROP to search idle CPU based on sum of util_avg

From: Tim Chen
Date: Mon Mar 14 2022 - 13:34:39 EST


On Mon, 2022-03-14 at 20:56 +0800, Chen Yu wrote:
>
> >
> > So nr_scan will probably be updated at llc-domain-lb-interval, which
> > is llc_size milliseconds. Since load can be varied a lot during such
> > a period, would this brought accuracy issues?
> >
> I agree there might be delay in reflecting the latest utilization.
> The sum_util calculated by periodic load balance after 112ms would be
> decay to about 0.5 * 0.5 * 0.5 * 0.7 = 8.75%.
> But consider that this is a server platform, I have an impression that
> the CPU utilization jitter during a small period of time is not a regular
> scenario? It seems to be a trade-off. Checking the util_avg in newidle
> load balance path would be more frequent, but it also brings overhead -
> multiple CPUs write/read the per-LLC shared variable and introduces cache
> false sharing. But to make this more robust, maybe we can add time interval
> control in newidle load balance too.
>
>

Also the idea is we allow ourselves to be non-optimal in terms of
scheduling for the short term variations. But we want to make sure that if
there's a long term trend in the load behavior, the scheduler should
adjust for that. I think if you see high utilization and CPUs are
all close to fully busy for quite a while, that is a long term trend
that overwhelms any short load jitters.

Tim