Re: [PATCH net-next v7 1/4] printk: Add execution context (task name/CPU) to printk_info

From: Geert Uytterhoeven

Date: Thu Feb 12 2026 - 10:33:42 EST


Hi Breno,

On Fri, 6 Feb 2026 at 15:39, Breno Leitao <leitao@xxxxxxxxxx> wrote:
> Extend struct printk_info to include the task name, pid, and CPU
> number where printk messages originate. This information is captured
> at vprintk_store() time and propagated through printk_message to
> nbcon_write_context, making it available to nbcon console drivers.
>
> This is useful for consoles like netconsole that want to include
> execution context in their output, allowing correlation of messages
> with specific tasks and CPUs regardless of where the console driver
> actually runs.
>
> The feature is controlled by CONFIG_PRINTK_EXECUTION_CTX, which is
> automatically selected by CONFIG_NETCONSOLE_DYNAMIC. When disabled,
> the helper functions compile to no-ops with no overhead.
>
> Suggested-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
> Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>

Thanks for your patch, which is now commit 60325c27d3cfe134 ("printk:
Add execution context (task name/CPU) to printk_info").

This increases (the IMHO already large) _printk_rb_static_infos
array by another 40 KiB, according to bloat-o-meter:

_printk_rb_static_infos 180224 221184 +40960

> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -341,6 +341,7 @@ config NETCONSOLE_DYNAMIC
> bool "Dynamic reconfiguration of logging targets"
> depends on NETCONSOLE && SYSFS && CONFIGFS_FS && \
> !(NETCONSOLE=y && CONFIGFS_FS=m)
> + select PRINTK_EXECUTION_CTX
> help
> This option enables the ability to dynamically reconfigure target
> parameters (interface, IP addresses, port numbers, MAC addresses)

I guess we should start disabling NETCONSOLE_DYNAMIC in the m68k
defconfigs...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds