Re: [PATCH printk] printk: flush consoles before checking progress

From: Petr Mladek
Date: Fri Sep 29 2023 - 09:43:15 EST


On Fri 2023-09-29 13:38:33, John Ogness wrote:
> Commit 9e70a5e109a4 ("printk: Add per-console suspended state")
> removed console lock usage during resume and replaced it with
> the clearly defined console_list_lock and srcu mechanisms.
>
> However, the console lock usage had an important side-effect
> of flushing the consoles. After its removal, consoles were no
> longer flushed before checking their progress.
>
> Add the console_lock/console_unlock dance to the beginning
> of __pr_flush() to actually flush the consoles before checking
> their progress. Also add comments to clarify this additional
> usage of the console lock.
>
> Finally, in case pr_flush() needs to poll-wait (for example,
> because there has been a handover to another CPU), reduce the
> polling interval from 100ms to 1ms. In the bug report it was
> mentioned that 100ms is unnecessarily long.
>
> Reported-by: Todd Brandt <todd.e.brandt@xxxxxxxxx>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217955
> Fixes: 9e70a5e109a4 ("printk: Add per-console suspended state")
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

Looks good to me:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

I am going to wait a bit for eventual feedback and push it to
linux-next the following week.

Best Regards,
Petr