From: "Ionut Nechita (Sunlight Linux)" <sunlightlinux@gmail.com>
To: christian.loehle@arm.com
Cc: daniel.lezcano@linaro.org, ionut_n2001@yahoo.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
rafael@kernel.org, sunlightlinux@gmail.com,
yumpusamongus@gmail.com
Subject: Re: [PATCH v2 0/1] cpuidle: menu: Fix high wakeup latency on modern platforms
Date: Mon, 26 Jan 2026 22:19:44 +0200 [thread overview]
Message-ID: <20260126201943.11505-2-sunlightlinux@gmail.com> (raw)
In-Reply-To: <54478318-cbee-46f2-9ff1-9c0ae15a89ab@arm.com>
From: Ionut Nechita <sunlightlinux@gmail.com>
On Thu, Jan 22 2026 at 08:49, Christian Loehle wrote:
> It was more of a question than a suggestion outright... And I still have
> more of them, quoting v1:
Thank you for the detailed feedback. Let me provide more context about
the workload and the platforms where I observed this issue.
> You also measured 150us wakeup latency, does this match the reported exit
> latency for your platform (roughly)?
> What do the platform states look like for you?
Yes, the measured latency matches the reported exit latencies. Here are
the platforms I've tested:
1. Intel Xeon Gold 6443N (Sapphire Rapids):
- C6 state: 190us latency, 600us residency target
- C1E state: 2us latency, 4us residency target
- Driver: intel_idle
2. AMD Ryzen 9 5900HS (laptop):
- C3 state: 350us latency, 700us residency target
- C2 state: 18us latency, 36us residency target
- Driver: acpi_idle
The problem manifests primarily on the Sapphire Rapids platform where
C6 has 190us exit latency.
> Also regarding NOHZ_FULL, does that make a difference for your workload?
Yes, absolutely. The workload context is:
- PREEMPT_RT kernel (realtime)
- Isolated cores (isolcpus=)
- NOHZ_FULL enabled on isolated cores
- Inter-core communication latency testing with qperf
- kthreads and IRQ affinity set to non-isolated cores
The scenario: Core A (isolated, NOHZ_FULL) sends a message to Core B
(also isolated, NOHZ_FULL, currently idle). Core B enters C6 during
idle, then when the message arrives, the 190us exit latency dominates
the response time. This is unacceptable for realtime workloads.
> Frankly, if there's relatively strict latency requirements on the system
> you need to let cpuidle know via pm qos or dma_latency....
I considered PM QoS and /dev/cpu_dma_latency, but they have limitations
for this use case:
1. Global PM QoS affects all cores, not just the isolated ones
2. Per-task PM QoS requires application modifications
3. /dev/cpu_dma_latency is system-wide, not per-core
For isolated cores with NOHZ_FULL in a realtime environment, we want
the governor to make smarter decisions based on actual predicted idle
time rather than relying on next_timer_ns which can be arbitrarily large
on tickless cores.
> A trace or cpuidle sysfs dump pre and post workload would really help to
> understand the situation.
I will collect and provide:
- ftrace cpuidle event traces
- Complete sysfs cpuidle dumps pre/post workload
- C-state residency and usage statistics
- Detailed qperf latency measurements
Regarding the safety margin question from v1: you're right that I need
to clarify the logic. The goal is to clamp the upper bound to avoid
unnecessarily deep states when prediction suggests short idle, while
still respecting the prediction for target residency selection.
I'll send a follow-up with the detailed trace data and measurements.
Thanks for your patience and valuable feedback,
Ionut
next prev parent reply other threads:[~2026-01-26 20:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 8:09 [PATCH v2 0/1] cpuidle: menu: Fix high wakeup latency on modern platforms Ionut Nechita (Sunlight Linux)
2026-01-22 8:09 ` [PATCH v2 1/1] cpuidle: menu: Use min() to prevent deep C-states when tick is stopped Ionut Nechita (Sunlight Linux)
2026-01-22 11:19 ` David Laight
2026-01-22 8:49 ` [PATCH v2 0/1] cpuidle: menu: Fix high wakeup latency on modern platforms Christian Loehle
2026-01-26 20:19 ` Ionut Nechita (Sunlight Linux) [this message]
2026-02-09 23:24 ` Russell Haley
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=20260126201943.11505-2-sunlightlinux@gmail.com \
--to=sunlightlinux@gmail.com \
--cc=christian.loehle@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=ionut_n2001@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=yumpusamongus@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