Re: [RFC PATCH 08/16] sched/fair: Extend util_est to improve rampup time

From: Christian Loehle
Date: Mon Oct 14 2024 - 12:04:48 EST


On 8/20/24 17:35, Qais Yousef wrote:
> Utilization invariance can cause big delays. When tasks are running,
> accumulate non-invairiant version of utilization to help tasks to settle
> down to their new util_avg values faster.
>
> Keep track of delta_exec during runnable across activations to help
> update util_est for a long running task accurately. util_est shoudl
> still behave the same at enqueue/dequeue.

For periodic tasks that have longer slices (~tick) this overestimates
util_est by a lot.
AFAICS this also breaks util_est for co-scheduling tasks of different slice
lengths.

I'm testing with HZ=1000, but should work for any. On a RK3399, all pinned
to one big.

Having task A be 10ms period with 20% util (running for 2ms when scheduled)
and tasks B+ with 1ms period and 1% util.

I guess 9/16 tries to work around that somewhat but without any leeway that
doesn't work. Even rt-app tasks will vary slightly in their util_est values:


Task A only:
mainline:
A:
util_avg: 192 util_est: 204

9/16 sched/fair: util_est: Take into account periodic tasks
A:
util_avg: 185 util_est: 423

8 tasks:
mainline:
A:
util_avg: 229 util_est: 229
The rest
util_avg: 12 util_est: 24

9/16 sched/fair: util_est: Take into account periodic tasks
A:
util_avg: 242 util_est: 643
The rest:
util_avg: 12 util_est: 50