public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Kajetan Puchalski <kajetan.puchalski@arm.com>,
	rafael@kernel.org, daniel.lezcano@linaro.org,
	Dietmar.Eggemann@arm.com, dsmythies@telus.net,
	yu.chen.surf@gmail.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Qais Yousef <qyousef@layalina.io>
Subject: Re: [PATCH v6 2/2] cpuidle: teo: Introduce util-awareness
Date: Wed, 12 Jun 2024 10:17:04 +0100	[thread overview]
Message-ID: <7ba09d9e-61dc-4d36-a401-0f89915fadfb@arm.com> (raw)
In-Reply-To: <CAKfTPtBh6ZDv7=1Tst1kjQjD=UjDG1DAaQOUCXvzP4ZhD94iTg@mail.gmail.com>



On 6/12/24 10:04, Vincent Guittot wrote:
> On Wed, 12 Jun 2024 at 09:25, Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> Hi Vincent,
>>
>> My apologies for delay, I was on sick leave.
>>
>> On 5/28/24 15:07, Vincent Guittot wrote:
>>> On Tue, 28 May 2024 at 11:59, Lukasz Luba <lukasz.luba@arm.com> wrote:
>>>>
>>>> Hi Vincent,
>>>>
>>>> On 5/28/24 10: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.
>>>>
>>>> Thanks for reporting this.
>>>> Could you add what regression it's causing, please?
>>>> Performance or higher power?
>>>
>>> It's not a perf but rather a power regression. I don't have a power
>>> counter so it's difficult to give figures but I found it while running
>>> a unitary test below on my rb5:
>>> run 500us every 19457ms on medium core (uclamp_min: 600).
>>
>> Mid cores are built differently, they have low static power (leakage).
>> Therefore, for them the residency in deeper idle state should be
>> longer than for Big CPU. When you power off the CPU you loose your
>> cache data/code. The data needs to be stored in the L3 or
>> further memory. When the cpu is powered on again, it needs code & data.
>> Thus, it will transfer that data/code from L3 or from DDR. That
>> information transfer has energy cost (it's not for free). The cost
>> of data from DDR is very high.
>> Then we have to justify if the energy lost while sleeping in shallower
>> idle state can be higher than loading data/code from outside.
>> For different CPU it would be different.
> 
> I'm aware of these points and the residency time of an idle state is
> set to reflect this cost. In my case, the idle time is far above the
> residency time which means that we should get some energy saving.
> cpu off 4.488ms
> cluster off 9.987ms
> vs
> sleep duration 18.000ms
> 
> Also, the policy of selecting a shallower idle state than the final
> selected one doesn't work with PSCI OSI because cpuidle is only aware
> of per CPU idle states but it is not aware of the cluster or
> deeper/wider idle states so cpuidle doesn't know what will be the
> final selected idle state. This is a major problem, in addition to
> keep the tick firing

I think we are aligned with this.
Something has to change in this implementation of idle gov.

I'm a bit more skeptical about your second point with PSCI.
That standard might be to strong to change.

  reply	other threads:[~2024-06-12  9:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 14:51 [PATCH v6 0/2] cpuidle: teo: Introduce util-awareness Kajetan Puchalski
2023-01-05 14:51 ` [PATCH v6 1/2] cpuidle: teo: Optionally skip polling states in teo_find_shallower_state() Kajetan Puchalski
2023-01-05 14:51 ` [PATCH v6 2/2] cpuidle: teo: Introduce util-awareness Kajetan Puchalski
2023-01-05 15:07   ` Rafael J. Wysocki
2023-01-05 15:20     ` Lukasz Luba
2023-01-05 15:34     ` Vincent Guittot
2023-01-05 17:11       ` Rafael J. Wysocki
2023-07-11 17:58   ` Qais Yousef
2023-07-17 13:47     ` Lukasz Luba
2023-07-17 18:21       ` Qais Yousef
2023-07-18 10:23         ` Lukasz Luba
2023-07-18 12:45           ` Qais Yousef
2023-07-18 12:02     ` Kajetan Puchalski
2023-07-18 13:24       ` Qais Yousef
2023-07-19 15:07         ` Kajetan Puchalski
2023-09-17  1:05         ` Qais Yousef
2023-09-18 11:41           ` Kajetan Puchalski
2023-09-19  0:04             ` Qais Yousef
2024-05-28  9:29           ` Vincent Guittot
2024-05-28  9:59             ` Lukasz Luba
2024-05-28 14:07               ` Vincent Guittot
2024-05-29 13:09                 ` Christian Loehle
2024-05-31  8:57                   ` Vincent Guittot
2024-06-12  7:25                 ` Lukasz Luba
2024-06-12  9:04                   ` Vincent Guittot
2024-06-12  9:17                     ` Lukasz Luba [this message]
2024-06-17  8:52                       ` Vincent Guittot
2024-06-19 12:20                       ` Lukasz Luba
2024-05-28 10:35             ` Christian Loehle
2024-05-28 12:12             ` Kajetan Puchalski
2024-05-29 10:23               ` Qais Yousef
2024-05-29 10:19             ` Qais Yousef
2024-06-12  7:53               ` Lukasz Luba
2024-06-16 21:48                 ` Qais Yousef
2024-06-17  8:13                   ` Lukasz Luba
2023-01-12 19:22 ` [PATCH v6 0/2] " Rafael J. Wysocki
2023-01-13 15:21   ` Kajetan Puchalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ba09d9e-61dc-4d36-a401-0f89915fadfb@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=Dietmar.Eggemann@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dsmythies@telus.net \
    --cc=kajetan.puchalski@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=yu.chen.surf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox