From: John Ogness <john.ogness@linutronix.de>
To: "Farber, Eliav" <farbere@amazon.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
"printk@lists.linux.dev" <printk@lists.linux.dev>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] serial: core: Don't spin for nbcon ownership with the port lock held
Date: Wed, 02 Dec 2026 10:01:28 +0106 [thread overview]
Message-ID: <87v75coydb.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <BY3PR18MB472263F7CCC5816927BC856AC64C2@BY3PR18MB4722.namprd18.prod.outlook.com>
On 2026-12-02, "Farber, Eliav" <farbere@amazon.com> wrote:
> Would you like me to send a v2 that fixes the commit log per your
> comments, with your Reviewed-by added? The diff is identical to v1.
I do not think it is strictly necessary.
> uart_port_lock() and its variants take the port lock and then spin until
> they own the nbcon console context, which synchronizes port->lock users
> against the write_atomic() callback. During a panic on another CPU the
> only acquire still allowed is a reacquire by the context that lost
> ownership, see commit 571c1ea91a73 ("printk: nbcon: Allow reacquire
> during panic"). The wrapper's acquire is not one, so it is always
> refused and the spin never ends.
>
> A panic on another CPU only has to land between taking the port lock and
> acquiring ownership. The CPU is then left holding the port lock, and in
> the _irq and _irqsave cases with interrupts disabled, so it stops
> answering the stop IPI from panic(). Triggering a panic from a shell on
> the serial console reproduces this: a CPU enters the wrapper while the
> tty is transmitting and never leaves it. On an 8250 console the panic
> output slows to tens of milliseconds per character and never reaches the
> reboot.
This commit message provides more context, so I certainly am not against
you posting a v2 with the updated message and my tag.
John
prev parent reply other threads:[~2026-12-02 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 15:51 [PATCH] serial: core: Don't spin for nbcon ownership with the port lock held Eliav Farber
2026-11-30 16:09 ` sashiko-bot
2026-11-30 17:28 ` John Ogness
2026-12-01 14:58 ` Eliav Farber
2026-12-01 16:29 ` John Ogness
2026-12-02 5:24 ` Farber, Eliav
2026-12-02 8:55 ` John Ogness [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v75coydb.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=farbere@amazon.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=printk@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.