Re: [PATCH v2] printk: Skip console drivers on PREEMPT_RT.

From: John Ogness
Date: Mon Jul 25 2022 - 08:51:43 EST


Hi Petr,

On 2022-07-25, Petr Mladek <pmladek@xxxxxxxx> wrote:
> From my point, this patch does not make much sense. IMHO, it will
> not make mainline usable with PREEMPT_RT. Any serious RT user will
> need to revert it and apply a better printk solution from
> the out-of-tree RT patchset.

The problem is that direct console printing cannot work with
PREEMPT_RT, even in a panic situation. And it never will (using "normal"
console drivers).

PREEMPT_RT is basically mainline now except for the kthread printers and
atomic consoles. But these features will not be available in mainline so
soon. (Atomic consoles have not gone through the LKML review process at
all yet.)

We see value in allowing PREEMPT_RT to be available now, even if it
means no console printing. You claim "any serious RT user" needs console
printing, but for production RT systems, the console is probably
disabled anyway.

We could solve this with kconfig tricks, making console kconfig options
depend on !PREEMPT_RT. But that would cause the console config of users
to be disabled, making it more inconvenient for them to turn it back on
once these features are available.

A software switch (as implemented by Sebastian's patch) may provide the
simplest transition. A 5.20 PREEMPT_RT would not have console printing,
but a later version (using the same config) would.

John