* [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release
@ 2013-04-10 15:00 Ulf Hansson
2013-04-10 19:05 ` Rafael J. Wysocki
2013-04-11 14:20 ` Kevin Hilman
0 siblings, 2 replies; 3+ messages in thread
From: Ulf Hansson @ 2013-04-10 15:00 UTC (permalink / raw)
To: linux-arm-kernel
From: Ulf Hansson <ulf.hansson@linaro.org>
Putting devices into idle|suspend in a synchronous manner means we are
waiting for each device to become idle|suspended before the probe|release
is fully done.
This patch switch to use the asynchronous runtime PM API:s instead and
thus improves the parallelism since we can move on and handle the next
device in queue in an earlier phase.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/dd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index bb5645e..35fa368 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -380,7 +380,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)
pm_runtime_barrier(dev);
ret = really_probe(dev, drv);
- pm_runtime_idle(dev);
+ pm_request_idle(dev);
return ret;
}
@@ -428,7 +428,7 @@ int device_attach(struct device *dev)
}
} else {
ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
- pm_runtime_idle(dev);
+ pm_request_idle(dev);
}
out_unlock:
device_unlock(dev);
@@ -499,7 +499,7 @@ static void __device_release_driver(struct device *dev)
BUS_NOTIFY_UNBIND_DRIVER,
dev);
- pm_runtime_put_sync(dev);
+ pm_runtime_put(dev);
if (dev->bus && dev->bus->remove)
dev->bus->remove(dev);
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release
2013-04-10 15:00 [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release Ulf Hansson
@ 2013-04-10 19:05 ` Rafael J. Wysocki
2013-04-11 14:20 ` Kevin Hilman
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-04-10 19:05 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, April 10, 2013 05:00:48 PM Ulf Hansson wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
>
> Putting devices into idle|suspend in a synchronous manner means we are
> waiting for each device to become idle|suspended before the probe|release
> is fully done.
>
> This patch switch to use the asynchronous runtime PM API:s instead and
> thus improves the parallelism since we can move on and handle the next
> device in queue in an earlier phase.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Kevin Hilman <khilman@linaro.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/base/dd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index bb5645e..35fa368 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -380,7 +380,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)
>
> pm_runtime_barrier(dev);
> ret = really_probe(dev, drv);
> - pm_runtime_idle(dev);
> + pm_request_idle(dev);
>
> return ret;
> }
> @@ -428,7 +428,7 @@ int device_attach(struct device *dev)
> }
> } else {
> ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
> - pm_runtime_idle(dev);
> + pm_request_idle(dev);
> }
> out_unlock:
> device_unlock(dev);
> @@ -499,7 +499,7 @@ static void __device_release_driver(struct device *dev)
> BUS_NOTIFY_UNBIND_DRIVER,
> dev);
>
> - pm_runtime_put_sync(dev);
> + pm_runtime_put(dev);
>
> if (dev->bus && dev->bus->remove)
> dev->bus->remove(dev);
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release
2013-04-10 15:00 [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release Ulf Hansson
2013-04-10 19:05 ` Rafael J. Wysocki
@ 2013-04-11 14:20 ` Kevin Hilman
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2013-04-11 14:20 UTC (permalink / raw)
To: linux-arm-kernel
Ulf Hansson <ulf.hansson@stericsson.com> writes:
> From: Ulf Hansson <ulf.hansson@linaro.org>
>
> Putting devices into idle|suspend in a synchronous manner means we are
> waiting for each device to become idle|suspended before the probe|release
> is fully done.
>
> This patch switch to use the asynchronous runtime PM API:s instead and
> thus improves the parallelism since we can move on and handle the next
> device in queue in an earlier phase.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Kevin Hilman <khilman@linaro.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-11 14:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 15:00 [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release Ulf Hansson
2013-04-10 19:05 ` Rafael J. Wysocki
2013-04-11 14:20 ` Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).