Re: [PATCH v6 2/2] cpuidle: teo: Introduce util-awareness

Lukasz Luba
2024-06-12T07:53:11Z

Hi Qais,

+Todd and Wei on CC

On 5/29/24 11:19, Qais Yousef wrote:
> On 05/28/24 11:29, Vincent Guittot wrote:
>> Hi All,
>>
>> I'm quite late on this thread but this patchset creates a major
>> regression for psci cpuidle driver when using the OSI mode (OS
>> initiated mode). In such a case, cpuidle driver takes care only of
>> CPUs power state and the deeper C-states ,which includes cluster and
>> other power domains, are handled with power domain framework. In such
>> configuration ,cpuidle has only 2 c-states : WFI and cpu off states
>> and others states that include the clusters, are managed by genpd and
>> its governor.
>>
>> This patch selects cpuidle c-state N-1 as soon as the utilization is
>> above CPU capacity / 64 which means at most a level of 16 on the big
>> core but can be as low as 4 on little cores. These levels are very low
>> and the main result is that as soon as there is very little activity
>> on a CPU, cpuidle always selects WFI states whatever the estimated
>> sleep duration and which prevents any deeper states. Another effect is
>> that it also keeps the tick firing every 1ms in my case.
>
> Unfortunately I think we need to revert this. We've been seeing the power
> regressions for a long while now and it doesn't seem we'll see an improvement
> soon based on last discussion.

Could you be more precised when you say 'we'?
It's not Vincent, because he said he cannot measure power on his end.

Do you mean Google ACK? Or Google Pixel Team?
You send emails from your private account and people are confused when
you say 'we'.

>
>>
>> IMO, we should at least increase the utilization level
>
> This won't help. We tried different values, unfortunately the logic is flawed.
> Utilization value on its own says nothing about the idleness of the system.

This is not true. When you up-migrate a task to big CPU, then CPU idle
gov can instantly benefit from utilization information and won't make
mistake based on old local history and won't use deep idle state.
So migrating the utilization from one CPU to another CPU says a lot
about the idleness to that destination CPU.

When Christian removed the util he got -4.5% lower score in GB5, so
this util has impact [1].

> I think best to revert and rethink the logic. Which is something we're pursuing
> and we'll share outcome when we have something to share. As it stands, this
> doesn't help. And we should really strive to avoid magic thresholds and values.
> They don't scale.

Please share the power numbers. It's not helping when you just say
some power regression w/o numbers, but with assumption that you
are working for big company.

Regards,
Lukasz

[1]