diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2015-10-15 17:02:19 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-28 04:33:04 +0100 |
commit | 2b1d88cda32f81685bae45c00bf517f77bcda3cd (patch) | |
tree | 6e61c6e8868866887fc14cb647b0c9d0636767c8 /drivers/base/power/domain_governor.c | |
parent | PM / Domains: Don't measure ->start|stop() latency in system PM callbacks (diff) | |
download | linux-2b1d88cda32f81685bae45c00bf517f77bcda3cd.tar.xz linux-2b1d88cda32f81685bae45c00bf517f77bcda3cd.zip |
PM / Domains: Merge measurements for PM QoS device latencies
Measure latency does by itself contribute to an increased latency, thus we
should avoid it when it isn't needed.
By merging the latency measurements for the ->save_state() and the
->stop() callbacks, we get one measurement instead of two and we get one
value to store instead of two. Let's also apply the likewise change for
the ->start() and ->restore_state() callbacks.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/domain_governor.c')
-rw-r--r-- | drivers/base/power/domain_governor.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index 85e17bacc834..e60dd12e23aa 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c @@ -77,10 +77,8 @@ static bool default_stop_ok(struct device *dev) dev_update_qos_constraint); if (constraint_ns > 0) { - constraint_ns -= td->save_state_latency_ns + - td->stop_latency_ns + - td->start_latency_ns + - td->restore_state_latency_ns; + constraint_ns -= td->suspend_latency_ns + + td->resume_latency_ns; if (constraint_ns == 0) return false; } |