From: Christian Loehle <christian.loehle@arm.com>
To: "Ionut Nechita (Sunlight Linux)" <sunlightlinux@gmail.com>,
rafael@kernel.org
Cc: daniel.lezcano@linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, yumpusamongus@gmail.com,
Ionut Nechita <ionut_n2001@yahoo.com>
Subject: Re: [PATCH v2 0/1] cpuidle: menu: Fix high wakeup latency on modern platforms
Date: Thu, 22 Jan 2026 08:49:21 +0000 [thread overview]
Message-ID: <54478318-cbee-46f2-9ff1-9c0ae15a89ab@arm.com> (raw)
In-Reply-To: <20260122080937.22347-2-sunlightlinux@gmail.com>
On 1/22/26 08:09, Ionut Nechita (Sunlight Linux) wrote:
> From: Ionut Nechita <ionut_n2001@yahoo.com>
>
> Hi,
>
> This v2 patch addresses high wakeup latency in the menu cpuidle governor
> on modern platforms with high C-state exit latencies.
>
> Changes in v2:
> ==============
>
> Based on Christian Loehle's feedback, I've simplified the approach to use
> min(predicted_ns, data->next_timer_ns) instead of the 25% safety margin
> from v1.
>
> The simpler approach is cleaner and achieves the same goal: preventing the
> governor from selecting excessively deep C-states when the prediction
> suggests a short idle period but next_timer_ns is large (e.g., 10ms).
>
> I will test both approaches (simple min vs 25% margin) and provide
> detailed comparison data including:
> - C-state residency tables
> - Usage statistics
> - Idle miss counts (above/below)
> - Actual latency measurements
>
> Thank you Christian for the valuable feedback and for pointing out that
> the simpler approach may be sufficient.
>
It was more of a question than a suggestion outright... And I still have
more of them, quoting v1:
+ * Add a 25% safety margin to the prediction to reduce the risk of
+ * selecting too shallow state, but clamp to next_timer to avoid
+ * selecting unnecessarily deep states.
but the safety margin was ontop of the prediction, i.e. it skewed towards
deeper states (not shallower ones).
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?
A trace or cpuidle sysfs dump pre and post workload would really help to
understand the situation.
Also regarding NOHZ_FULL, does that make a difference for your workload?
That would sort of imply very few idle wakeups (otherwise that bit of tick
overhead probably wouldn't matter. Is the NOHZ_FULL gain only in latency?
Frankly, if there's relatively strict latency requirements on the system
you need to let cpuidle know via pm qos or dma_latency....
next prev parent reply other threads:[~2026-01-22 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 8:09 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 ` Christian Loehle [this message]
2026-01-26 20:19 ` [PATCH v2 0/1] cpuidle: menu: Fix high wakeup latency on modern platforms Ionut Nechita (Sunlight Linux)
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=54478318-cbee-46f2-9ff1-9c0ae15a89ab@arm.com \
--to=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=sunlightlinux@gmail.com \
--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
all inboxes | Powered by JetHome®