Commit 04bf7539c08d64184736cdc5e4ad617eda77eb0f

Authored by Rafael J. Wysocki
Committed by Linus Torvalds
1 parent af2bd9d534

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>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

kernel/power/suspend_test.c
... ... @@ -19,7 +19,7 @@
19 19 * The time it takes is system-specific though, so when we test this
20 20 * during system bootup we allow a LOT of time.
21 21 */
22   -#define TEST_SUSPEND_SECONDS 5
  22 +#define TEST_SUSPEND_SECONDS 10
23 23  
24 24 static unsigned long suspend_test_start_time;
25 25  
... ... @@ -49,7 +49,8 @@
49 49 * has some performance issues. The stack dump of a WARN_ON
50 50 * is more likely to get the right attention than a printk...
51 51 */
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);
53 54 }
54 55  
55 56 /*