]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: trace: Add RAS tracepoint to monitor link speed changes
authorShuai Xue <xueshuai@linux.alibaba.com>
Wed, 10 Dec 2025 13:29:06 +0000 (21:29 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Dec 2025 22:06:00 +0000 (16:06 -0600)
commitd4318c1a79ac49f0726dd23a01d1961757b5f98d
tree8be85a74ca40ee63b5c7d7ef0093587d5cb691ee
parent9e541b3cee70a3bbe86b176c903c23b29fe033cd
PCI: trace: Add RAS tracepoint to monitor link speed changes

PCIe link speed degradation directly impacts system performance and often
indicates hardware issues such as faulty devices, physical layer problems,
or configuration errors.

To this end, add a RAS tracepoint to monitor link speed changes, enabling
proactive health checks and diagnostic analysis.

The following output is generated when a device is hotplugged:

  $ echo 1 > /sys/kernel/debug/tracing/events/pci/pcie_link_event/enable
  $ 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:20, max_bus_speed:23, width:1, flit_mode:0, status:DLLLA

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Suggested-by: Matthew W Carlis <mattc@purestorage.com>
Suggested-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20251210132907.58799-3-xueshuai@linux.alibaba.com
drivers/pci/hotplug/pciehp_hpc.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/bwctrl.c
drivers/pci/probe.c
include/trace/events/pci.h