[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bk2b8jsi.fsf@jogness.linutronix.de>
Date: Fri, 02 Aug 2024 09:35:17 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, Steven Rostedt
<rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: preffer_ofload param: was: Re: [PATCH printk v3 11/19] printk:
nbcon: Rely on kthreads for normal operation
On 2024-08-01, Petr Mladek <pmladek@...e.com> wrote:
> I believe that the parameter "prefer_offload" adds more harm than good
> because:
>
> + It is a non-sense for nbcon consoles. They always prefer offload
> except for emergency and panic. But emergency and panic is
> handled transparently by nbcon_get_default_prio().
>
> + It is confusing even for legacy consoles after introducing the
> kthread. There will be three types of offload:
>
> + do console_lock()/unlock() in IRQ work
> + wake kthread
> + wake kthread in IRQ work
I think the confusion comes from my intention of the function. I wanted
a caller to use it as:
"Tell me how to flush."
This requires input from the caller to know some information about what
the caller's intentions are.
If I change the function so that a caller uses it as:
"Tell me what flush mechanisms are available to me."
Then the function does not need to know the caller's intentions. It only
needs to know the caller's state, and that information is readily
available via global/per-cpu variables.
I will drop the @prefer_offload argument, simplifying the function to
only provide a list of available flush options. The caller will then
decide itself which option it wants to use. I believe this aligns with
your intentions as well.
John
Powered by blists - more mailing lists