aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2006-11-03 01:07:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-03 15:27:58 -0500
commitb918f6e62cd46774f9fc0a3fbba6bd10ad85ee14 (patch)
treed73dc0e8823c8445d84701cc3d527e0e34494a32 /Documentation/ABI
parent90d53909443b3986569b38ef145f09ea2359af75 (diff)
[PATCH] swsusp: debugging
Add a swsusp debugging mode. This does everything that's needed for a suspend except for actually suspending. So we can look in the log messages and work out a) what code is being slow and b) which drivers are misbehaving. (1) # echo testproc > /sys/power/disk # echo disk > /sys/power/state This should turn off the non-boot CPU, freeze all processes, wait for 5 seconds and then thaw the processes and the CPU. (2) # echo test > /sys/power/disk # echo disk > /sys/power/state This should turn off the non-boot CPU, freeze all processes, shrink memory, suspend all devices, wait for 5 seconds, resume the devices etc. Cc: Pavel Machek <pavel@ucw.cz> Cc: Stefan Seyfried <seife@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-power17
1 files changed, 16 insertions, 1 deletions
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index d882f8093871..dcff4d0623ad 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -21,7 +21,7 @@ Description:
21 these states. 21 these states.
22 22
23What: /sys/power/disk 23What: /sys/power/disk
24Date: August 2006 24Date: September 2006
25Contact: Rafael J. Wysocki <rjw@sisk.pl> 25Contact: Rafael J. Wysocki <rjw@sisk.pl>
26Description: 26Description:
27 The /sys/power/disk file controls the operating mode of the 27 The /sys/power/disk file controls the operating mode of the
@@ -39,6 +39,19 @@ Description:
39 'reboot' - the memory image will be saved by the kernel and 39 'reboot' - the memory image will be saved by the kernel and
40 the system will be rebooted. 40 the system will be rebooted.
41 41
42 Additionally, /sys/power/disk can be used to turn on one of the
43 two testing modes of the suspend-to-disk mechanism: 'testproc'
44 or 'test'. If the suspend-to-disk mechanism is in the
45 'testproc' mode, writing 'disk' to /sys/power/state will cause
46 the kernel to disable nonboot CPUs and freeze tasks, wait for 5
47 seconds, unfreeze tasks and enable nonboot CPUs. If it is in
48 the 'test' mode, writing 'disk' to /sys/power/state will cause
49 the kernel to disable nonboot CPUs and freeze tasks, shrink
50 memory, suspend devices, wait for 5 seconds, resume devices,
51 unfreeze tasks and enable nonboot CPUs. Then, we are able to
52 look in the log messages and work out, for example, which code
53 is being slow and which device drivers are misbehaving.
54
42 The suspend-to-disk method may be chosen by writing to this 55 The suspend-to-disk method may be chosen by writing to this
43 file one of the accepted strings: 56 file one of the accepted strings:
44 57
@@ -46,6 +59,8 @@ Description:
46 'platform' 59 'platform'
47 'shutdown' 60 'shutdown'
48 'reboot' 61 'reboot'
62 'testproc'
63 'test'
49 64
50 It will only change to 'firmware' or 'platform' if the system 65 It will only change to 'firmware' or 'platform' if the system
51 supports that. 66 supports that.