lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251121100315.316300-6-ulf.hansson@linaro.org>
Date: Fri, 21 Nov 2025 11:03:11 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "Rafael J . Wysocki" <rafael@...nel.org>,
	linux-pm@...r.kernel.org
Cc: Vincent Guittot <vincent.guittot@...aro.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Kevin Hilman <khilman@...libre.com>,
	Pavel Machek <pavel@...nel.org>,
	Len Brown <len.brown@...el.com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Maulik Shah <quic_mkshah@...cinc.com>,
	Prasad Sodagudi <psodagud@...cinc.com>,
	Dhruva Gole <d-gole@...com>,
	Deepti Jaggi <quic_djaggi@...cinc.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v3 5/6] cpuidle: Respect the CPU system wakeup QoS limit for cpuidle

The CPU system wakeup QoS limit must be respected for the regular cpuidle
state selection. Therefore, let's extend the common governor helper
cpuidle_governor_latency_req(), to take the constraint into account.

Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
---

Changes in v3:
	- New patch.

---
 drivers/cpuidle/governor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
index 0d0f9751ff8f..5d0e7f78c6c5 100644
--- a/drivers/cpuidle/governor.c
+++ b/drivers/cpuidle/governor.c
@@ -111,6 +111,10 @@ s64 cpuidle_governor_latency_req(unsigned int cpu)
 	struct device *device = get_cpu_device(cpu);
 	int device_req = dev_pm_qos_raw_resume_latency(device);
 	int global_req = cpu_latency_qos_limit();
+	int global_wake_req = cpu_wakeup_latency_qos_limit();
+
+	if (global_req > global_wake_req)
+		global_req = global_wake_req;
 
 	if (device_req > global_req)
 		device_req = global_req;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ