Re: [PATCH v2] printk_legacy_map: use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP

From: John Ogness

Date: Thu Oct 23 2025 - 11:46:11 EST


On 2025-10-23, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
>> With PREEMPT_RT, legacy console printing is forced into its own
>> dedicated kthread. At runtime this is checked via
>> force_legacy_kthread(). So with PREEMPT_RT there is no need for special
>> lockdep trickery. Once we can get all the consoles switched over to
>> nbcon, !PREEMPT_RT will also not need this lockdep trickery.
>
> This does not matter. My point is that there no need for this ifdefery.
> You say: This might get the nesting wrong but it is fine because the
> outer lock should be this. This does not hurt if it is also applied on
> RT. _BUT_ on RT you don't even trigger this path so this ifdef is not
> needed.

I am more concerned if we implement a bug and the outer lock is _not_
what it should be and RT _does_ call this path. IMHO avoiding
lockdep-forcing when it is not needed is more important than avoiding
the trivial PREEMPT_RT ifdefery. But I will not fight it.

John