Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ulf Hansson and committed by
Rafael J. Wysocki
e2e4695f 8e7de6dc

+5 -1
+5 -1
drivers/pmdomain/governor.c
··· 351 351 ktime_t domain_wakeup, next_hrtimer; 352 352 ktime_t now = ktime_get(); 353 353 struct device *cpu_dev; 354 - s64 cpu_constraint, global_constraint; 354 + s64 cpu_constraint, global_constraint, wakeup_constraint; 355 355 s64 idle_duration_ns; 356 356 int cpu, i; 357 357 ··· 362 362 if (!(genpd->flags & GENPD_FLAG_CPU_DOMAIN)) 363 363 return true; 364 364 365 + wakeup_constraint = cpu_wakeup_latency_qos_limit(); 365 366 global_constraint = cpu_latency_qos_limit(); 367 + if (global_constraint > wakeup_constraint) 368 + global_constraint = wakeup_constraint; 369 + 366 370 /* 367 371 * Find the next wakeup for any of the online CPUs within the PM domain 368 372 * and its subdomains. Note, we only need the genpd->cpus, as it already