Skip to content

Commit e2e4695

Browse files
storulfrafaeljw
authored andcommitted
pmdomain: 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 genpd governor for CPUs to take the constraint into account when it selects a domain idle state for the corresponding PM domain. Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Kevin Hilman (TI) <khilman@baylibre.com> Tested-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://patch.msgid.link/20251125112650.329269-4-ulf.hansson@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8e7de6d commit e2e4695

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/pmdomain/governor.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
351351
ktime_t domain_wakeup, next_hrtimer;
352352
ktime_t now = ktime_get();
353353
struct device *cpu_dev;
354-
s64 cpu_constraint, global_constraint;
354+
s64 cpu_constraint, global_constraint, wakeup_constraint;
355355
s64 idle_duration_ns;
356356
int cpu, i;
357357

@@ -362,7 +362,11 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
362362
if (!(genpd->flags & GENPD_FLAG_CPU_DOMAIN))
363363
return true;
364364

365+
wakeup_constraint = cpu_wakeup_latency_qos_limit();
365366
global_constraint = cpu_latency_qos_limit();
367+
if (global_constraint > wakeup_constraint)
368+
global_constraint = wakeup_constraint;
369+
366370
/*
367371
* Find the next wakeup for any of the online CPUs within the PM domain
368372
* and its subdomains. Note, we only need the genpd->cpus, as it already

0 commit comments

Comments
 (0)