[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoPullwnOGvUoCPv@pathway.suse.cz>
Date: Tue, 2 Jul 2024 14:12:06 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
Jonathan Corbet <corbet@....net>,
"Paul E. McKenney" <paulmck@...nel.org>,
Josh Poimboeuf <jpoimboe@...nel.org>,
"Borislav Petkov (AMD)" <bp@...en8.de>,
Xiongwei Song <xiongwei.song@...driver.com>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH printk v2 16/18] printk: Provide threadprintk boot
argument
On Tue 2024-06-04 01:30:51, John Ogness wrote:
> For PREEMPT_RT, legacy console printing is performed in a dedicated
> kthread. However, this behavior can also be interesting for other
> preemption models as it minimizes the duration of printk() calls by
> deferring all printing.
>
> Provide a new boot argument "threadprintk" that will create the
> dedicated kthread for legacy console printing for !PREEMPT_RT
> systems.
>
> The implementation is the same as the "threadirqs" boot argument.
>
> Users should be aware that if this option is enabled, the shutdown,
> reboot, and panic messages probably will not be visible on the
> legacy consoles.
printk() is _heavily_ limited in this mode. Users would see the
messages only when the system is running well.
I think that this is a _big_ difference against "threadirqs".
It still allows to handle some critical IRQ handlers directly
by using IRQF_NO_THREAD.
> Non-legacy consoles (NBCON) already have their own dedicated kernel
> threads for printing and reliable shutdown, reboot, and panic
> printing. This option really only applies to legacy consoles.
OK, the NBCON consoles might make it a bit more useful. But there
will be only one at the beginning. And it won't work with boot
consoles.
All I want to say is that this mode has big limitations
and kind of weird semantic. This semantic is basically
needed only with PREEMPT_RT.
I would prefer to remove this patch for now. It would give us
more time to think about the threaded and sync modes.
Or I would at least use "force" in the name to make it more clear
that it forces some non-default (non-optimal) behavior.
I would call it "printk_thread_force" or "printk_legacy_thread_force".
Best Regards,
Petr
Powered by blists - more mailing lists