* [PATCH RFC printk] printk: Postpone kthread startup
@ 2026-10-15 13:07 John Ogness
2026-10-15 13:30 ` John Ogness
0 siblings, 1 reply; 2+ messages in thread
From: John Ogness @ 2026-10-15 13:07 UTC (permalink / raw)
To: Petr Mladek
Cc: Sergey Senozhatsky, Steven Rostedt, Derek Barbosa, linux-kernel
There have been various bug reports related to SMP systems hanging
on boot. The reports vary wildly but seem to have some overlap with
regard to missed IPI's during SMP setup. The reports also show that
reverting NBCON console usage allows the bugs to disappear.
The NBCON kthreads for console printing are started very early
during boot using early_initcall(). Since these kthreads are
actively enabling/disabling interrupts during early boot, they may
be interfering with SMP setup.
Postpone kthread starting until after all arch initcalls have
completed.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
@pmladek: This patch came about from the RedHat reports we were talking
about at LPC. Derek is still doing final testing, but this patch most
likely fixes the issue. We probably will want this for the 7.3-hotfix in
order to preempt any other surprise bug reports.
It would be nice to start the kthreads sooner, but it is not worth
possibly hanging some sensitive (buggy?) hardware.
kernel/printk/nbcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index f05cc90123bd4..04fdd71b37e55 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -1475,7 +1475,7 @@ static int __init printk_setup_threads(void)
console_list_unlock();
return 0;
}
-early_initcall(printk_setup_threads);
+subsys_initcall(printk_setup_threads);
/**
* nbcon_alloc - Allocate buffers needed by the nbcon console
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RFC printk] printk: Postpone kthread startup
2026-10-15 13:07 [PATCH RFC printk] printk: Postpone kthread startup John Ogness
@ 2026-10-15 13:30 ` John Ogness
0 siblings, 0 replies; 2+ messages in thread
From: John Ogness @ 2026-10-15 13:30 UTC (permalink / raw)
To: Petr Mladek
Cc: Sergey Senozhatsky, Steven Rostedt, Derek Barbosa, linux-kernel
On 2026-10-15, John Ogness <john.ogness@linutronix.de> wrote:
> There have been various bug reports related to SMP systems hanging
> on boot. The reports vary wildly but seem to have some overlap with
> regard to missed IPI's during SMP setup. The reports also show that
> reverting NBCON console usage allows the bugs to disappear.
>
> The NBCON kthreads for console printing are started very early
> during boot using early_initcall(). Since these kthreads are
> actively enabling/disabling interrupts during early boot, they may
> be interfering with SMP setup.
>
> Postpone kthread starting until after all arch initcalls have
> completed.
This should also contain:
Reported-by: Derek Barbosa <debarbos@redhat.com>
Closes: https://lore.kernel.org/linux-rt-users/arPmYPbFLf2EldIl@debarbos-thinkpadt14gen5.rmtusma.csb
Fixes: 5f1b414ca027 ("printk: nbcon: Start printing threads")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-15 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 13:07 [PATCH RFC printk] printk: Postpone kthread startup John Ogness
2026-10-15 13:30 ` John Ogness
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®