[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87cy2tlrm3.fsf@jogness.linutronix.de>
Date: Wed, 28 Jan 2026 15:55:24 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Breno Leitao <leitao@...ian.org>, Breno Leitao <leitao@...ian.org>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, pmladek@...e.com
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Steven Rostedt
<rostedt@...dmis.org>, Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, asantostc@...il.com, efault@....de,
gustavold@...il.com, calvin@...nvd.org, jv@...sburgh.net,
mpdesouza@...e.com, kernel-team@...a.com
Subject: Re: [PATCH net-next v5 3/4] netconsole: convert to NBCON console
infrastructure
On 2026-01-28, Breno Leitao <leitao@...ian.org> wrote:
> Convert netconsole from the legacy console API to the NBCON framework.
> NBCON provides threaded printing which unblocks printk()s and flushes in
> a thread, decoupling network TX from printk() when netconsole is
> in use.
>
> Since netconsole relies on the network stack which cannot safely operate
> from all atomic contexts, mark both consoles with
> CON_NBCON_ATOMIC_UNSAFE. (See discussion in [1])
>
> CON_NBCON_ATOMIC_UNSAFE restricts write_atomic() usage to emergency
> scenarios (panic) where regular messages are sent in threaded mode.
>
> Implementation changes:
> - Unify write_ext_msg() and write_msg() into netconsole_write()
> - Add device_lock/device_unlock callbacks to manage target_list_lock
> - Use nbcon_enter_unsafe()/nbcon_exit_unsafe() around network
> operations.
> - If nbcon_enter_unsafe() fails, just return given netconsole lost
> the ownership of the console.
> - Set write_thread and write_atomic callbacks (both use same function)
>
> Link: https://lore.kernel.org/all/b2qps3uywhmjaym4mht2wpxul4yqtuuayeoq4iv4k3zf5wdgh3@tocu6c7mj4lt/ [1]
> Signed-off-by: Breno Leitao <leitao@...ian.org>
Reviewed-by: John Ogness <john.ogness@...utronix.de>
Powered by blists - more mailing lists