Re: [PATCH net-next v5 1/4] printk: Add execution context (task name/CPU) to printk_info
From: Breno Leitao
Date: Mon Feb 02 2026 - 06:50:15 EST
Hello Jakub,
On Fri, Jan 30, 2026 at 05:32:43PM -0800, Jakub Kicinski wrote:
> On Wed, 28 Jan 2026 06:17:37 -0800 Breno Leitao wrote:
> > +config CONSOLE_HAS_EXECUTION_CTX
> > + bool
> > + help
> > + Selected by console drivers that support execution context
> > + (task name/CPU) in their output. This enables PRINTK_EXECUTION_CTX
> > + to provide the necessary infrastructure.
> > +
> > +config PRINTK_EXECUTION_CTX
> > + bool "Include execution context (task/CPU) in printk messages"
> > + depends on PRINTK && CONSOLE_HAS_EXECUTION_CTX
> > + default CONSOLE_HAS_EXECUTION_CTX
>
> AFAIU the double-symbol thing serves no practical purpose?
>
> If none of the console drivers uses the metadata what would be the
> point of capturing it?
>
> Conversely if some console driver wants this data there's no option
> for the user to disable it.
>
> AFAICT this patch should only add one invisible symbol for capturing
> the context and have netcons enable it.
The two-symbol design establishes a clear separation between what console
drivers require and how the printk core implements it.
This approach was discussed here:
https://lore.kernel.org/all/87eco09hgb.fsf@xxxxxxxxxxxxxxxxxxxxx/
> I don't see a reason at this
> stage to prompt users with netcons disabled whether they want
> PRINTK_EXECUTION_CTX
Users won't see a prompt when netconsole is disabled. Since
CONSOLE_HAS_EXECUTION_CTX is only selected when NETCONSOLE_DYNAMIC is
enabled, PRINTK_EXECUTION_CTX will be automatically deselected without
prompting. Additionally, CONSOLE_HAS_EXECUTION_CTX is a hidden symbol that
cannot be manually forced.
That said, I'm open to making PRINTK_EXECUTION_CTX invisible as well,
given it is behaving like one already.