Skip to content

Commit 04bf753

Browse files
rjwysockitorvalds
authored andcommitted
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>
1 parent af2bd9d commit 04bf753

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎kernel/power/suspend_test.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* The time it takes is system-specific though, so when we test this
2020
* during system bootup we allow a LOT of time.
2121
*/
22-
#define TEST_SUSPEND_SECONDS 5
22+
#define TEST_SUSPEND_SECONDS 10
2323

2424
static unsigned long suspend_test_start_time;
2525

@@ -49,7 +49,8 @@ void suspend_test_finish(const char *label)
4949
* has some performance issues. The stack dump of a WARN_ON
5050
* is more likely to get the right attention than a printk...
5151
*/
52-
WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label);
52+
WARN(msec > (TEST_SUSPEND_SECONDS * 1000),
53+
"Component: %s, time: %u\n", label, msec);
5354
}
5455

5556
/*

0 commit comments

Comments
 (0)