public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Gondois <pierre.gondois@arm.com>
To: 黄少波 <huangshaobo2075@phytium.com.cn>,
	linux-pm@vger.kernel.org, "Sudeep Holla" <Sudeep.Holla@arm.com>
Cc: rafael@kernel.org, lenb@kernel.org, deepthi@linux.vnet.ibm.com,
	khilman@kernel.org, Christian Loehle <christian.loehle@arm.com>
Subject: Re: Subject: [cpuidle] Limitation: cannot model asymmetric C-state latencies on big.LITTLE SoCs
Date: Tue, 17 Jun 2025 17:59:36 +0200	[thread overview]
Message-ID: <97e8bc72-e44b-487a-91ba-206732094955@arm.com> (raw)
In-Reply-To: <5d7534c.5492.1977796c43a.Coremail.huangshaobo2075@phytium.com.cn>

Hello Shaobo,

On 6/16/25 09:14, 黄少波 wrote:
> From: huangshaobo2075@phytium.com.cn
> To: linux-pm@vger.kernel.org
> Cc: rafael@kernel.org, lenb@kernel.org, deepthi@linux.vnet.ibm.com, khilman@kernel.org
> Subject: [cpuidle] Limitation: cannot model asymmetric C-state latencies on big.LITTLE SoCs
>
> Hi,
>
> I'm working on an ARM64 platform with a big.LITTLE CPU topology. While parsing the ACPI tables,
> I noticed that the C-state latency and residency values differ between the big and LITTLE cores,
> as expected.
>
> However, I found that the current cpuidle framework only allows a single global `cpuidle_driver`,
> and all CPUs share the same `cpuidle_driver->states[]` array. As a result, only the first core to
> initialize (usually a LITTLE core) sets up the C-states, and the same values are applied to all cores,
> including the big ones. This leads to incorrect idle behavior on asymmetric platforms.
>
> I believe this behavior was introduced by commit 46bcfad7a819
> ("cpuidle: Single/Global registration of idle states").
>
> I understand this design was introduced in 2011 to simplify cpuidle and reduce memory usage:
> https://lkml.org/lkml/2011/4/25/83
>
> However, on today's heterogeneous SoCs, this global model no longer suffices. For proper modeling,
> we need support for per-cluster or per-core cpuidle drivers, or at least some mechanism to allow
> different idle state parameters per CPU.
>
> Has there been any discussion or work toward lifting this limitation?
>
> Thanks,
>
> Shaobo Huang
>
>
> 信息安全声明:本邮件包含信息归发件人所在组织所有,发件人所在组织对该邮件拥有所有权利。请接收者注意保密,未经发件人书面许可,不得向任何第三方组织和个人透露本邮件所含信息。
> Information Security Notice: The information contained in this mail is solely property of the sender's organization.This mail communication is confidential.Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.

Just to confirm that I can reproduce this.

Sudeep will be back in a few days, in case he has more background or
another view on the topic,
but I agree asymmetric _LPI states should ideally be visible to the kernel.

I am having a look at the code aswell. In case you have an
implementation, I can provide additional testing.

Regards,

Pierre

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  parent reply	other threads:[~2025-06-17 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  7:14 Subject: [cpuidle] Limitation: cannot model asymmetric C-state latencies on big.LITTLE SoCs 黄少波
2025-06-16 11:29 ` Rafael J. Wysocki
2025-06-17  2:49   ` 黄少波
2025-06-20 10:46   ` Sudeep Holla
2025-06-17 15:59 ` Pierre Gondois [this message]
2025-06-18  3:34   ` 黄少波
2025-06-20 10:38 ` Sudeep Holla

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=97e8bc72-e44b-487a-91ba-206732094955@arm.com \
    --to=pierre.gondois@arm.com \
    --cc=Sudeep.Holla@arm.com \
    --cc=christian.loehle@arm.com \
    --cc=deepthi@linux.vnet.ibm.com \
    --cc=huangshaobo2075@phytium.com.cn \
    --cc=khilman@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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