Commit 9023ca0
printk: do not wait for consoles when suspended
The console_stop() and console_start() functions call pr_flush().
When suspending, these functions are called by the serial subsystem
while the serial port is suspended. In this scenario, if there are
any pending messages, a call to pr_flush() will always result in a
timeout because the serial port cannot make forward progress. This
causes longer suspend and resume times.
Add a check in pr_flush() so that it will immediately timeout if
the consoles are suspended.
Fixes: 3b604ca ("printk: add pr_flush()")
Reported-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Tested-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220715061042.373640-2-john.ogness@linutronix.de1 parent 07a22b6 commit 9023ca0
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3380 | 3380 | | |
3381 | 3381 | | |
3382 | 3382 | | |
| 3383 | + | |
3383 | 3384 | | |
3384 | 3385 | | |
3385 | 3386 | | |
| |||
3389 | 3390 | | |
3390 | 3391 | | |
3391 | 3392 | | |
3392 | | - | |
3393 | 3393 | | |
3394 | | - | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
3395 | 3402 | | |
3396 | 3403 | | |
| 3404 | + | |
| 3405 | + | |
3397 | 3406 | | |
3398 | 3407 | | |
3399 | 3408 | | |
| |||
0 commit comments