Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307646 > unrolled thread
| Started by | Lucas Stach <l.stach@pengutronix.de> |
|---|---|
| First post | 2016-01-12 18:20 +0100 |
| Last post | 2016-01-13 20:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] PM / Runtime: use deferrable timer for autosuspend Lucas Stach <l.stach@pengutronix.de> - 2016-01-12 18:20 +0100
Re: [PATCH 2/2] PM / Runtime: use deferrable timer for autosuspend Pavel Machek <pavel@ucw.cz> - 2016-01-13 20:10 +0100
| From | Lucas Stach <l.stach@pengutronix.de> |
|---|---|
| Date | 2016-01-12 18:20 +0100 |
| Subject | [PATCH 2/2] PM / Runtime: use deferrable timer for autosuspend |
| Message-ID | <qQaLV-3Xe-23@gated-at.bofh.it> |
The timeouts used in PM autosuspend are relatively coarse (the shortest I could find in a quick search through the kernel is 50ms). As they are already handled relaxed by saving the overhead of always rearming the timer by opportunistically suspending a device a bit early, it should not matter if the the timeout is missed slightly. By using a deferrable timer the CPU will not be woken just to handle the autosuspend timeout, but handling will be batched with other wakeups in the system. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- drivers/base/power/runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index e1a10a03df8e..975a282600ff 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -1383,7 +1383,7 @@ void pm_runtime_init(struct device *dev) INIT_WORK(&dev->power.work, pm_runtime_work); dev->power.timer_expires = 0; - setup_timer(&dev->power.suspend_timer, pm_suspend_timer_fn, + setup_deferrable_timer(&dev->power.suspend_timer, pm_suspend_timer_fn, (unsigned long)dev); init_waitqueue_head(&dev->power.wait_queue); -- 2.6.4
[toc] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-01-13 20:10 +0100 |
| Message-ID | <qQyXU-41l-11@gated-at.bofh.it> |
| In reply to | #1307646 |
On Tue 2016-01-12 18:17:20, Lucas Stach wrote: > The timeouts used in PM autosuspend are relatively coarse (the shortest > I could find in a quick search through the kernel is 50ms). As they are > already handled relaxed by saving the overhead of always rearming the > timer by opportunistically suspending a device a bit early, it should > not matter if the the timeout is missed slightly. > > By using a deferrable timer the CPU will not be woken just to handle > the autosuspend timeout, but handling will be batched with other > wakeups in the system. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web