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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Jul 2009 11:01:54 +0800
From:	Zhang Rui <rui.zhang@...el.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-pm <linux-pm@...ts.linux-foundation.org>,
	linux-acpi <linux-acpi@...r.kernel.org>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, Pavel Machek <pavel@....cz>,
	Len Brown <lenb@...nel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Arjan van de Ven <arjan@...ux.intel.com>, dtor@...l.ru,
	"Zhang, Rui" <rui.zhang@...el.com>
Subject: [PATCH V2 0/4] introduce device async actions mechanism

Hi,

this is the patch set I made to speed up the device
suspend/resume/shutdown process.

A new mechanism called Device Async Actions is introduced
in this patch set.

The basic idea is that,
if the suspend/resume/shutdown process of a device group, including
a root device and its child devices, are independent of other devices,
we create an async domain for this device group,
and make them suspend/resume/shutdown asynchronously.    

Note that this mechanism is not designed for all the devices.
Generally speaking, if we want to suspend/resume/shutdown a device
asynchronously, we should
1. find out a suitable device async group that contains this device.
2. get the root device in the device async group.
3. root device registers an async domain for this device async group,
   with the proper async action type.

I tried to make it more generic but failed.
Because currently the dependency are pulled from the device tree, i.e.
parent devices will not be suspended until all of their children have
been suspended and children devices will not be resumed before the
parents.

But some hardware breaks this rule.
e.g. 
00:1a.0 USB Controller: Intel Corporation 82801H USB UHCI Controller
00:1a.1 USB Controller: Intel Corporation 82801H USB UHCI Controller
00:1a.7 USB Controller: Intel Corporation 82801H USB2 EHCI Controller
these pci devices are siblings, but 00:1a.7 must be resumed after
00:1a.0, said by Alan Stern, while we can not get this dependency
from device tree.

Currently, in order to make sure that it won't bring any side effects,
I only convert the ACPI battery and i8042 to use this framework, which
reduces the S3 kernel time (kernel suspend and kernel resume time) from
7.0s to less than 6.5s.
And it also reduces 0.4s shutdown time in my test.

Any comments are welcome. :)

thanks,
rui

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ