aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power
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/power
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/power')
-rw-r--r--Documentation/power/interface.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt
index a66bec222b16..74311d7e0f3c 100644
--- a/Documentation/power/interface.txt
+++ b/Documentation/power/interface.txt
@@ -30,6 +30,17 @@ testing). The system will support either 'firmware' or 'platform', and
30that is known a priori. But, the user may choose 'shutdown' or 30that is known a priori. But, the user may choose 'shutdown' or
31'reboot' as alternatives. 31'reboot' as alternatives.
32 32
33Additionally, /sys/power/disk can be used to turn on one of the two testing
34modes of the suspend-to-disk mechanism: 'testproc' or 'test'. If the
35suspend-to-disk mechanism is in the 'testproc' mode, writing 'disk' to
36/sys/power/state will cause the kernel to disable nonboot CPUs and freeze
37tasks, wait for 5 seconds, unfreeze tasks and enable nonboot CPUs. If it is
38in the 'test' mode, writing 'disk' to /sys/power/state will cause the kernel
39to disable nonboot CPUs and freeze tasks, shrink memory, suspend devices, wait
40for 5 seconds, resume devices, unfreeze tasks and enable nonboot CPUs. Then,
41we are able to look in the log messages and work out, for example, which code
42is being slow and which device drivers are misbehaving.
43
33Reading from this file will display what the mode is currently set 44Reading from this file will display what the mode is currently set
34to. Writing to this file will accept one of 45to. Writing to this file will accept one of
35 46
@@ -37,6 +48,8 @@ to. Writing to this file will accept one of
37 'platform' 48 'platform'
38 'shutdown' 49 'shutdown'
39 'reboot' 50 'reboot'
51 'testproc'
52 'test'
40 53
41It will only change to 'firmware' or 'platform' if the system supports 54It will only change to 'firmware' or 'platform' if the system supports
42it. 55it.