Skip to content

netconsole: Add taskname sysdata support

Breno Leitao linux-doc linux-kselftest lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected] change-id 20250217-netcons_current-2c635fa5beda

Versions newest first

  1. v2 Latest8 patches 2 repliesApplied 8/8
  2. v17 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- Add an extra patch to convert the comparison more stable. (Paolo)
- Changed the argument of a function (Simon)
- Removed the warn on current == NULLL since it shouldn't be the case. (Simon and Paolo)
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8netconsole: prefix CPU_NR sysdata feature with SYSDATA_drivers/net/netconsole.c+7 -70 repliesApplied
2/8netconsole: Make boolean comparison consistentdrivers/net/netconsole.c+1 -11 replyApplied
3/8netconsole: refactor CPU number formatting into separate functiondrivers/net/netconsole.c+11 -70 repliesApplied
4/8netconsole: add taskname to extradata entry countdrivers/net/netconsole.c+4 -00 repliesApplied
5/8netconsole: add configfs controls for taskname sysdata featuredrivers/net/netconsole.c+50 -00 repliesApplied
6/8netconsole: add task name to extra data fieldsdrivers/net/netconsole.c+10 -11 replyApplied
7/8netconsole: docs: document the task name featureDocumentation/networking/netconsole.rst+28 -00 repliesApplied
8/8netconsole: selftest: add task name append testingtools/testing/selftests/drivers/net/netcons_sysdata.sh+44 -70 repliesApplied

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/8] netconsole: Add taskname sysdata support

This patchset introduces a new feature to the netconsole extradata subsystem that enables the inclusion of the current task's name in the sysdata output of netconsole messages.

This enhancement is particularly valuable for large-scale deployments, such as Meta's, where netconsole collects messages from millions of servers and stores them in a data warehouse for analysis. Engineers often rely on these messages to investigate issues and assess kernel health.

One common challenge we face is determining the context in which a particular message was generated. By including the task name (task->comm) with each message, this feature provides a direct answer to the frequently asked question: "What was running when this message was generated?"

This added context will significantly improve our ability to diagnose and troubleshoot issues, making it easier to interpret output of netconsole.

The patchset consists of seven patches that implement the following changes:

* Refactor CPU number formatting into a separate function
* Prefix CPU_NR sysdata feature with SYSDATA_
* Patch to covert a bitwise operation into boolean
* Add configfs controls for taskname sysdata feature
* Add taskname to extradata entry count
* Add support for including task name in netconsole's extra data output
* Document the task name feature in Documentation/networking/netconsole.rst
* Add test coverage for the task name feature to the existing sysdata selftest script

These changes allow users to enable or disable the task name feature via configfs and provide additional context for kernel messages by showing which task generated each console message.

I have tested these patches on some servers and they seem to work as expected.

---
Changes in v2:
- Add an extra patch to convert the comparison more stable. (Paolo)
- Changed the argument of a function (Simon)
- Removed the warn on current == NULLL since it shouldn't be the case. (Simon and Paolo)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Breno Leitao (8):
netconsole: prefix CPU_NR sysdata feature with SYSDATA_
netconsole: Make boolean comparison consistent
netconsole: refactor CPU number formatting into separate function
netconsole: add taskname to extradata entry count
netconsole: add configfs controls for taskname sysdata feature
netconsole: add task name to extra data fields
netconsole: docs: document the task name feature
netconsole: selftest: add task name append testing

 Documentation/networking/netconsole.rst            | 28 +++++++
 drivers/net/netconsole.c                           | 95 ++++++++++++++++++----
 .../selftests/drivers/net/netcons_sysdata.sh       | 51 ++++++++++--
 3 files changed, 153 insertions(+), 21 deletions(-)

---
base-commit: 56794b5862c5a9aefcf2b703257c6fb93f76573e
change-id: 20250217-netcons_current-2c635fa5beda
prerequisite-change-id: 20250212-netdevsim-258d2d628175:v3
prerequisite-patch-id: 4ecfdbc58dd599d2358655e4ad742cbb9dde39f3

Best regards,

Signature · 1 line
Breno Leitao <[email protected]>