[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716123323.65441-1-ulf.hansson@linaro.org>
Date: Wed, 16 Jul 2025 14:33:16 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "Rafael J . Wysocki" <rafael@...nel.org>,
linux-pm@...r.kernel.org
Cc: Kevin Hilman <khilman@...libre.com>,
Pavel Machek <pavel@...nel.org>,
Len Brown <len.brown@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Saravana Kannan <saravanak@...gle.com>,
Maulik Shah <quic_mkshah@...cinc.com>,
Prasad Sodagudi <psodagud@...cinc.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-kernel@...r.kernel.org
Subject: [RFC/PATCH 0/3] PM: QoS: Introduce a system-wakeup QoS limit for s2idle and genpd
Some platforms and devices supports multiple low-power-states than can be
used for system-wide suspend. Today these states are selected on per
subsystem basis and in most cases it's the deepest possible state that
becomes selected.
For some use-cases this is a problem as it isn't suitable or even breaks
the system-wakeup latency constraint, when we decide to enter these deeper
states during system-wide suspend.
Therefore, let's introduce an interface for user-space, allowing us to specify
the system-wakeup QoS limit. As part of this initial series, let's also start
to take the new QoS limit into account when selecting a low-power-state for PM
domains by genpd and for s2idle in the cpuidle core.
Note that, documentation of the new userspace interface are intentionally not
included in this initial version. I simply wanted us to focus the discussion on
whether we think the proposed approach seems reasonable, before spending time
on the documentation.
If you want to run some tests, there is a new file added at
/dev/system_wakeup_latency, which works similar as the /dev/cpu_dma_latency [1].
Note that, I was first considering to re-use /dev/cpu_dma_latency for the
system-wakeup latency constraint too, but after a second thought it seems like
mixing QoS limits for runtime and system-wide suspend doesn't really work well.
Kind regards
Ulf Hansson
[1]
Documentation/power/pm_qos_interface.rst
Ulf Hansson (3):
PM: QoS: Introduce a system-wakeup QoS limit
pmdomain: Respect the system-wakeup QoS limit at system-wide suspend
cpuidle: Respect the system-wakeup QoS limit for s2idle
drivers/cpuidle/cpuidle.c | 9 +--
drivers/pmdomain/core.c | 10 +++-
drivers/pmdomain/governor.c | 23 ++++++++
include/linux/pm_domain.h | 1 +
include/linux/pm_qos.h | 9 +++
kernel/power/qos.c | 114 ++++++++++++++++++++++++++++++++++++
6 files changed, 160 insertions(+), 6 deletions(-)
--
2.43.0
Powered by blists - more mailing lists