PM / devfreq: Add dev_pm_qos support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 15 repliesIn review
Changes since v4 from the cover letter
* Move more devfreq_add_device init ahead of device_register.
* Make devfreq_dev_release cleanup devices not yet in devfreq_list. This is simpler than previous attempt to add to devfreq_list sonner.
* Take devfreq->lock in trans_stat_show
* Register dev_pm_opp notifier on devfreq parent dev (which has OPPs) Link to v4: https://patchwork.kernel.org/cover/11114657/
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | PM / devfreq: Lock devfreq in trans_stat_showdrivers/ | +13 | 3 replies | |
| 2/8 | PM / devfreq: Don't fail devfreq_dev_release if not in listdrivers/ | +1 | 1 reply | |
| 3/8 | PM / devfreq: Move more initialization before registrationdrivers/ | +20 | 4 replies | |
| 4/8 | PM / devfreq: Don't take lock in devfreq_add_devicedrivers/ | +0 | 1 reply | |
| 5/8 | PM / devfreq: Introduce devfreq_get_freq_rangedrivers/ | +63 | 1 reply | |
| 6/8 | PM / devfreq: Add dev_pm_qos supportdrivers/ include/ | +76 | 1 reply | |
| 7/8 | PM / devfreq: Use dev_pm_qos for sysfs min/max_freqdrivers/ include/ | +38 | 2 replies | |
| 8/8 | PM / devfreq: Move opp notifier registration to coredrivers/ drivers/ drivers/ +1 more | +6 | 2 replies |
Reviews trailers per patch
4 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Matthias Kaehlcke |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] PM / devfreq: Add dev_pm_qos support
Add dev_pm_qos notifiers to devfreq core in order to support frequency limits via dev_pm_qos_add_request.
Unlike the rest of devfreq the dev_pm_qos frequency is measured in Khz, this is consistent with current dev_pm_qos usage for cpufreq and allows frequencies above 2Ghz (pm_qos expresses limits as s32).
Like with cpufreq the handling of min_freq/max_freq is moved to the dev_pm_qos mechanism. Constraints from userspace are no longer clamped on store, instead all values can be written and we only check against OPPs in a new devfreq_get_freq_range function. This is consistent with the design of dev_pm_qos.
Notifiers from pm_qos are executed under a single global dev_pm_qos_mtx and need to take devfreq->lock. Notifier registration takes the same dev_pm_qos_mtx so in order to prevent lockdep warnings it must be done outside devfreq->lock. Current devfreq_add_device does *all* initialization under devfreq->lock and that needs to be relaxed.
---
Changes since v4:
* Move more devfreq_add_device init ahead of device_register.
* Make devfreq_dev_release cleanup devices not yet in devfreq_list. This is simpler than previous attempt to add to devfreq_list sonner.
* Take devfreq->lock in trans_stat_show
* Register dev_pm_opp notifier on devfreq parent dev (which has OPPs) Link to v4: https://patchwork.kernel.org/cover/11114657/
Changes since v3:
* Cleanup locking and error-handling in devfreq_add_device
* Register notifiers after device registration but before governor start
* Keep the initialization of min_req/max_req ahead of device_register because it's used for sysfs handling
* Use HZ_PER_KHZ instead of 1000
* Add kernel-doc comments
* Move OPP notifier to core
Link to v3: https://patchwork.kernel.org/cover/11104061/
Changes since v2:
* Handle sysfs via dev_pm_qos (in separate patch)
* Add locking to {min,max}_freq_show
* Fix checkpatch issues (long lines etc)
Link to v2: https://patchwork.kernel.org/patch/11084279/
Changes since v1:
* Add doxygen comments for min_nb/max_nb
* Remove notifiers on error/cleanup paths. Keep gotos simple by relying on dev_pm_qos_remove_notifier ignoring notifiers which were not added. Link to v1: https://patchwork.kernel.org/patch/11078475/
Leonard Crestez (8):
PM / devfreq: Lock devfreq in trans_stat_show
PM / devfreq: Don't fail devfreq_dev_release if not in list PM / devfreq: Move more initialization before registration PM / devfreq: Don't take lock in devfreq_add_device PM / devfreq: Introduce devfreq_get_freq_range
PM / devfreq: Add dev_pm_qos support
PM / devfreq: Use dev_pm_qos for sysfs min/max_freq PM / devfreq: Move opp notifier registration to core
drivers/devfreq/devfreq.c | 362 +++++++++++++++++++---------------- drivers/devfreq/exynos-bus.c | 7 - drivers/devfreq/rk3399_dmc.c | 6 - include/linux/devfreq.h | 22 +-- 4 files changed, 204 insertions(+), 193 deletions(-)
Signature · 1 line
2.17.1