lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1606291002030.1917-100000@iolanthe.rowland.org>
Date:	Wed, 29 Jun 2016 10:02:42 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
cc:	Linux PM list <linux-pm@...r.kernel.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Kevin Hilman <khilman@...libre.com>
Subject: Re: [PATCH] PM / runtime: Asynchronous "idle" in pm_runtime_allow()

On Wed, 29 Jun 2016, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Arjan reports that it takes a relatively long time to enable runtime
> PM for multiple devices at system startup, because all writes to the
> "control" attribute in sysfs are handled synchronously and if the
> device is suspended as a result of the write, it will block until
> that operation is complete.
> 
> That may be avoided by passing the RPM_ASYNC flag to rpm_idle()
> in pm_runtime_allow() which will make it execute the device's
> "idle" callback asynchronously, so writes to "control" changing
> it from "on" to "auto" will return without waiting.
> 
> Reported-by: Arjan van de Ven <arjan@...ux.intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  drivers/base/power/runtime.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/base/power/runtime.c
> ===================================================================
> --- linux-pm.orig/drivers/base/power/runtime.c
> +++ linux-pm/drivers/base/power/runtime.c
> @@ -1256,7 +1256,7 @@ void pm_runtime_allow(struct device *dev
>  
>  	dev->power.runtime_auto = true;
>  	if (atomic_dec_and_test(&dev->power.usage_count))
> -		rpm_idle(dev, RPM_AUTO);
> +		rpm_idle(dev, RPM_AUTO | RPM_ASYNC);
>  
>   out:
>  	spin_unlock_irq(&dev->power.lock);

Acked-by: Alan Stern <stern@...land.harvard.edu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ