mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Breno Leitao <leitao@debian.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kernel-team@meta.com, max@kutsevol.com, thepacketgeek@gmail.com
Subject: Re: [PATCH net-next v2 5/5] netconsole: docs: Add documentation for CPU number auto-population
Date: Wed, 15 Jan 2025 14:56:06 -0800	[thread overview]
Message-ID: <417a5115-891b-41b9-bd2c-a77e813b4ef0@infradead.org> (raw)
In-Reply-To: <20250115-netcon_cpu-v2-5-95971b44dc56@debian.org>



On 1/15/25 5:35 AM, Breno Leitao wrote:
> Update the netconsole documentation to explain the new feature that
> allows automatic population of the CPU number.
> 
> The key changes include introducing a new section titled "CPU number
> auto population in userdata", explaining how to enable the CPU number
> auto-population feature by writing to the "populate_cpu_nr" file in the
> netconsole configfs hierarchy.
> 
> This documentation update ensures users are aware of the new CPU number
> auto-population functionality and how to leverage it for better
> demultiplexing and visibility of parallel netconsole output.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  Documentation/networking/netconsole.rst | 45 +++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
> 
> diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst
> index 94c4680fdf3e7e1a0020d11b44547acfd68072a5..bc9ccebdae7adadd7c57aef20a726536d7ab3173 100644
> --- a/Documentation/networking/netconsole.rst
> +++ b/Documentation/networking/netconsole.rst
> @@ -17,6 +17,8 @@ Release prepend support by Breno Leitao <leitao@debian.org>, Jul 7 2023
>  
>  Userdata append support by Matthew Wood <thepacketgeek@gmail.com>, Jan 22 2024
>  
> +Sysdata append support by Breno Leitao <leitao@debian.org>, Jan 15 2025
> +
>  Please send bug reports to Matt Mackall <mpm@selenic.com>
>  Satyam Sharma <satyam.sharma@gmail.com>, and Cong Wang <xiyou.wangcong@gmail.com>
>  
> @@ -238,6 +240,49 @@ Delete `userdata` entries with `rmdir`::
>  
>     It is recommended to not write user data values with newlines.
>  
> +CPU number auto population in userdata
> +--------------------------------------
> +
> +Inside the netconsole configfs hierarchy, there is a file called
> +`cpu_nr` under the `userdata` directory. This file is used to enable or disable
> +the automatic CPU number population feature. This feature automatically
> +populate the CPU number that is sending the message.

   populates

> +
> +To enable the CPU number auto-population::
> +
> +  echo 1 > /sys/kernel/config/netconsole/target1/userdata/cpu_nr
> +
> +When this option is enabled, the netconsole messages will include an additional
> +line in the userdata field with the format `cpu=<cpu_number>`. This allows the
> +receiver of the netconsole messages to easily differentiate and demultiplex
> +messages originating from different CPUs, which is particularly useful when
> +dealing with parallel log output.
> +
> +Example::
> +
> +  echo "This is a message" > /dev/kmsg
> +  12,607,22085407756,-;This is a message
> +   cpu=42
> +
> +In this example, the message was sent by CPU 42.
> +
> +.. note::
> +
> +   If the user has set a conflicting `cpu` key in the userdata dictionary,
> +   both keys will be reported, with the kernel-populated entry appearing after
> +   the user one. For example::
> +
> +     # User-defined CPU entry
> +     mkdir -p /sys/kernel/config/netconsole/target1/userdata/cpu
> +     echo "1" > /sys/kernel/config/netconsole/target1/userdata/cpu/value
> +
> +   Output might look like::
> +
> +     12,607,22085407756,-;This is a message
> +      cpu=1
> +      cpu=42    # kernel-populated value
> +
> +
>  Extended console:
>  =================
>  
> 

-- 
~Randy


  reply	other threads:[~2025-01-15 22:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 13:35 [PATCH net-next v2 0/5] netconsole: Add support for CPU population Breno Leitao
2025-01-15 13:35 ` [PATCH net-next v2 1/5] netconsole: Rename userdata to extradata Breno Leitao
2025-01-15 13:35 ` [PATCH net-next v2 2/5] netconsole: Helper to count number of used entries Breno Leitao
2025-01-15 13:35 ` [PATCH net-next v2 3/5] netconsole: add support for sysdata and CPU population Breno Leitao
2025-01-17  1:44   ` Jakub Kicinski
2025-01-17 11:02     ` Breno Leitao
2025-01-18  2:35       ` Jakub Kicinski
2025-01-20 17:30         ` Breno Leitao
2025-01-20 19:06           ` Jakub Kicinski
2025-01-24 15:28             ` Breno Leitao
2025-01-15 13:35 ` [PATCH net-next v2 4/5] netconsole: selftest: test for sysdata CPU Breno Leitao
2025-01-15 13:35 ` [PATCH net-next v2 5/5] netconsole: docs: Add documentation for CPU number auto-population Breno Leitao
2025-01-15 22:56   ` Randy Dunlap [this message]
2025-01-16  9:31     ` Breno Leitao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=417a5115-891b-41b9-bd2c-a77e813b4ef0@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=max@kutsevol.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=thepacketgeek@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®