diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-10-20 06:45:02 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-22 08:23:45 +0900 |
commit | 04bf7539c08d64184736cdc5e4ad617eda77eb0f (patch) | |
tree | b5fd1d3877e2a781a7953c408fdbde952acbdbc6 | |
parent | af2bd9d534ca9f1ffdeb0780fb8508e71ed55803 (diff) | |
download | kernel_samsung_crespo-04bf7539c08d64184736cdc5e4ad617eda77eb0f.zip kernel_samsung_crespo-04bf7539c08d64184736cdc5e4ad617eda77eb0f.tar.gz kernel_samsung_crespo-04bf7539c08d64184736cdc5e4ad617eda77eb0f.tar.bz2 |
PM: Make warning in suspend_test_finish() less likely to happen
Increase TEST_SUSPEND_SECONDS to 10 so the warning in
suspend_test_finish() doesn't annoy the users of slower systems so much.
Also, make the warning print the suspend-resume cycle time, so that we
know why the warning actually triggered.
Patch prepared during the hacking session at the Kernel Summit in Tokyo.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/power/suspend_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index 17d8bb1..25596e4 100644 --- a/kernel/power/suspend_test.c +++ b/kernel/power/suspend_test.c @@ -19,7 +19,7 @@ * The time it takes is system-specific though, so when we test this * during system bootup we allow a LOT of time. */ -#define TEST_SUSPEND_SECONDS 5 +#define TEST_SUSPEND_SECONDS 10 static unsigned long suspend_test_start_time; @@ -49,7 +49,8 @@ void suspend_test_finish(const char *label) * has some performance issues. The stack dump of a WARN_ON * is more likely to get the right attention than a printk... */ - WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label); + WARN(msec > (TEST_SUSPEND_SECONDS * 1000), + "Component: %s, time: %u\n", label, msec); } /* |