[PATCH v3 5/6] cpuidle: Respect the CPU system wakeup QoS limit for cpuidle

Ulf Hansson posted 6 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH v3 5/6] cpuidle: Respect the CPU system wakeup QoS limit for cpuidle
Posted by Ulf Hansson 1 week, 3 days ago
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@linaro.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
Re: [PATCH v3 5/6] cpuidle: Respect the CPU system wakeup QoS limit for cpuidle
Posted by Dhruva Gole 6 days, 19 hours ago
On Nov 21, 2025 at 11:03:11 +0100, Ulf Hansson wrote:
> 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@linaro.org>
> ---

Reviewed-by: Dhruva Gole <d-gole@ti.com>

> 
> 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
> 

-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated