Re: [PATCH printk v8 30/35] printk: Add helper for flush type logic

From: John Ogness
Date: Fri Aug 23 2024 - 01:26:09 EST


On 2024-08-21, Petr Mladek <pmladek@xxxxxxxx> wrote:
> <proposal>
> Introduce a new internal struct console_flush_type that specifies which
> which console flushing methods should be used in the context of
> the caller.
> </proposal>
>
>> Introduce a helper function to fill out console_flush_type to
>> be used for flushing call sites.
>>
>> Replace the logic of all flushing call sites to use the new
>> helper.
>
> I would add:
>
> <proposal>
> This change standardizes behavior, leading to both fixes and optimizations
> across various call sites. For instance, in console_cpu_notify(), the new
> logic ensures that nbcon consoles are flushed when they aren’t managed
> by the legacy loop. Similarly, in console_flush_on_panic(), the system
> no longer needs to flush nbcon consoles if none are present.
> </proposal>

Sure. It is a nice addition of details. Thanks.

John