kernel-hacking-2024-linux-s.../drivers/base/power
Rafael J. Wysocki 6ff7bb0d02 PM / Domains: Cache device stop and domain power off governor results, v3
The results of the default device stop and domain power off governor
functions for generic PM domains, default_stop_ok() and
default_power_down_ok(), depend only on the timing data of devices,
which are static, and on their PM QoS constraints.  Thus, in theory,
these functions only need to carry out their computations, which may
be time consuming in general, when it is known that the PM QoS
constraint of at least one of the devices in question has changed.

Use the PM QoS notifiers of devices to implement that.  First,
introduce new fields, constraint_changed and max_off_time_changed,
into struct gpd_timing_data and struct generic_pm_domain,
respectively, and register a PM QoS notifier function when adding
a device into a domain that will set those fields to 'true' whenever
the device's PM QoS constraint is modified.  Second, make
default_stop_ok() and default_power_down_ok() use those fields to
decide whether or not to carry out their computations from scratch.

The device and PM domain hierarchies are taken into account in that
and the expense is that the changes of PM QoS constraints of
suspended devices will not be taken into account immediately, which
isn't guaranteed anyway in general.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-05 21:51:58 +02:00
..
clock_ops.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
common.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
domain.c PM / Domains: Cache device stop and domain power off governor results, v3 2012-05-05 21:51:58 +02:00
domain_governor.c PM / Domains: Cache device stop and domain power off governor results, v3 2012-05-05 21:51:58 +02:00
generic_ops.c PM / Sleep: Introduce generic callbacks for new device PM phases 2012-01-29 20:38:41 +01:00
main.c PM / Sleep: Introduce "late suspend" and "early resume" of devices 2012-01-29 20:38:29 +01:00
Makefile PM / Domains: Add device stop governor function (v4) 2011-12-01 21:47:40 +01:00
opp.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
power.h PM / QoS: Make it possible to expose PM QoS latency constraints 2012-03-13 22:37:14 +01:00
qos.c PM / QoS: Create device constraints objects on notifier registration 2012-05-01 21:28:43 +02:00
runtime.c PM / Runtime: Remove device fields related to suspend time, v2 2012-05-01 21:28:38 +02:00
sysfs.c PM / QoS: Make it possible to expose PM QoS latency constraints 2012-03-13 22:37:14 +01:00
trace.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
wakeup.c PM / Sleep: Add more wakeup source initialization routines 2012-03-04 23:08:46 +01:00