All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: rostedt@goodmis.org, Lukas Wunner <lukas@wunner.de>,
	 linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	 linux-edac@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	 helgaas@kernel.org, mattc@purestorage.com,
	Jonathan.Cameron@huawei.com,  bhelgaas@google.com,
	tony.luck@intel.com, bp@alien8.de,  mhiramat@kernel.org,
	mathieu.desnoyers@efficios.com, oleg@redhat.com,
	 naveen@kernel.org, davem@davemloft.net,
	anil.s.keshavamurthy@intel.com,  mark.rutland@arm.com,
	peterz@infradead.org, tianruidong@linux.alibaba.com
Subject: Re: [PATCH v12 3/3] Documentation: tracing: Add documentation about PCI tracepoints
Date: Tue, 14 Oct 2025 17:40:56 +0300 (EEST)	[thread overview]
Message-ID: <cf4d3079-2d1b-dfa4-aa5f-e018962131bd@linux.intel.com> (raw)
In-Reply-To: <20251014123159.57764-4-xueshuai@linux.alibaba.com>

[-- Attachment #1: Type: text/plain, Size: 3396 bytes --]

On Tue, 14 Oct 2025, Shuai Xue wrote:

> The PCI tracing system provides tracepoints to monitor critical hardware
> events that can impact system performance and reliability. Add
> documentation about it.
> 
> Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
> ---
>  Documentation/trace/events-pci.rst | 74 ++++++++++++++++++++++++++++++
>  1 file changed, 74 insertions(+)
>  create mode 100644 Documentation/trace/events-pci.rst
> 
> diff --git a/Documentation/trace/events-pci.rst b/Documentation/trace/events-pci.rst
> new file mode 100644
> index 000000000000..500b27713224
> --- /dev/null
> +++ b/Documentation/trace/events-pci.rst
> @@ -0,0 +1,74 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +===========================
> +Subsystem Trace Points: PCI
> +===========================
> +
> +Overview
> +========
> +The PCI tracing system provides tracepoints to monitor critical hardware events
> +that can impact system performance and reliability. These events normally show
> +up here:
> +
> +	/sys/kernel/tracing/events/pci
> +
> +Cf. include/trace/events/pci.h for the events definitions.
> +
> +Available Tracepoints
> +=====================
> +
> +pci_hp_event
> +------------
> +
> +Monitors PCI hotplug events including card insertion/removal and link
> +state changes.
> +::
> +
> +    pci_hp_event  "%s slot:%s, event:%s\n"
> +
> +**Event Types**:
> +
> +* ``LINK_UP`` - PCIe link established
> +* ``LINK_DOWN`` - PCIe link lost
> +* ``CARD_PRESENT`` - Card detected in slot
> +* ``CARD_NOT_PRESENT`` - Card removed from slot
> +
> +**Example Usage**:
> +
> +    # Enable the tracepoint
> +    echo 1> /sys/kernel/debug/tracing/events/pci/pci_hp_event/enable
> +
> +    # Monitor events (the following output is generated when a device is hotplugged)
> +    cat /sys/kernel/debug/tracing/trace_pipe
> +       irq/51-pciehp-88      [001] .....  1311.177459: pci_hp_event: 0000:00:02.0 slot:10, event:CARD_PRESENT
> +
> +       irq/51-pciehp-88      [001] .....  1311.177566: pci_hp_event: 0000:00:02.0 slot:10, event:LINK_UP
> +
> +pcie_link_event
> +---------------
> +
> +Monitors PCIe link speed changes and provides detailed link status information.
> +::
> +
> +    pcie_link_event  "%s type:%d, reason:%d, cur_bus_speed:%s, max_bus_speed:%s, width:%u, flit_mode:%u, status:%s\n"
> +
> +**Parameters**:
> +
> +* ``type`` - PCIe device type (4=Root Port, etc.)
> +* ``reason`` - Reason for link change:
> +
> +  - ``0`` - Link retrain
> +  - ``1`` - Bus enumeration
> +  - ``2`` - Bandwidth controller enable
> +  - ``3`` - Bandwidth controller IRQ

Maybe these two should be called "Bandwidth notification" as that's the 
name of the underlying mechanism.

For the entire series,

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

> +  - ``4`` - Hotplug event
> +
> +
> +**Example Usage**:
> +
> +    # Enable the tracepoint
> +    echo1 > /sys/kernel/debug/tracing/events/pci/pcie_link_event/enable
> +
> +    # Monitor events (the following output is generated when a device is hotplugged)
> +    cat /sys/kernel/debug/tracing/trace_pipe
> +       irq/51-pciehp-88      [001] .....   381.545386: pcie_link_event: 0000:00:02.0 type:4, reason:4, cur_bus_speed:2.5 GT/s PCIe, max_bus_speed:16.0 GT/s PCIe, width:1, flit_mode:0, status:DLLLA
> 

-- 
 i.

  reply	other threads:[~2025-10-14 14:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 12:31 [PATCH v12 0/3] PCI: trace: Add a RAS tracepoint to monitor link speed changes Shuai Xue
2025-10-14 12:31 ` [PATCH v12 1/3] PCI: trace: Add a generic RAS tracepoint for hotplug event Shuai Xue
2025-10-14 15:40   ` Steven Rostedt
2025-10-15  2:35     ` Shuai Xue
2025-10-15  6:29     ` Shuai Xue
2025-10-15 14:37       ` Steven Rostedt
2025-10-20  1:32         ` Shuai Xue
2025-10-20 15:30           ` Steven Rostedt
2025-10-21  1:50             ` Shuai Xue
2025-10-14 12:31 ` [PATCH v12 2/3] PCI: trace: Add a RAS tracepoint to monitor link speed changes Shuai Xue
2025-10-15  4:49   ` kernel test robot
2025-10-14 12:31 ` [PATCH v12 3/3] Documentation: tracing: Add documentation about PCI tracepoints Shuai Xue
2025-10-14 14:40   ` Ilpo Järvinen [this message]
2025-10-15  2:36     ` Shuai Xue

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=cf4d3079-2d1b-dfa4-aa5f-e018962131bd@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=helgaas@kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mattc@purestorage.com \
    --cc=mhiramat@kernel.org \
    --cc=naveen@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tianruidong@linux.alibaba.com \
    --cc=tony.luck@intel.com \
    --cc=xueshuai@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.