Breno Leitao says:
====================
netconsole: Optimize console registration and improve testing
During performance analysis of console subsystem latency, I discovered that
netconsole registers console handlers even when no active targets exist.
These orphaned console handlers are invoked on every printk() call, get
the lock, iterate through empty target lists, and consume CPU cycles
without performing any useful work.
This patch series addresses the inefficiency by:
1. Implementing dynamic console registration/unregistration based on target
availability, ensuring console handlers are only active when needed
2. Adding automatic cleanup of unused console registrations when targets
are disabled or removed
3. Extending the selftest suite to cover non-extended console format,
which was previously untested
The optimization reduces printk() overhead by eliminating unnecessary
function calls and list traversals when netconsole targets are not
configured, improving overall system performance during heavy logging
scenarios.
v2: https://lore.kernel.org/
20250602-netcons_ext-v2-0-
ef88d999326d@debian.org
v1: https://lore.kernel.org/
20250528-netcons_ext-v1-1-
69f71e404e00@debian.org
====================
Link: https://patch.msgid.link/20250609-netcons_ext-v3-0-5336fa670326@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>