在 2025/1/15 09:37, Shuai Xue 写道:
Hotplug events are critical indicators for analyzing hardware health,
particularly in AI supercomputers where surprise link downs can
significantly impact system performance and reliability.

To this end, define a new TRACING_SYSTEM named pci, add a generic RAS
tracepoint for hotplug event to help healthy check, and generate
tracepoints for pcie hotplug event. Add enum pci_hotplug_event in
include/uapi/linux/pci.h so applications like rasdaemon can register
tracepoint event handlers for it.

The output like below:

$ echo 1 > /sys/kernel/debug/tracing/events/pci/pci_hp_event/enable
$ cat /sys/kernel/debug/tracing/trace_pipe
     <...>-206     [001] .....    40.373870: pci_hp_event: 0000:00:02.0 
slot:10, event:Link Down

     <...>-206     [001] .....    40.374871: pci_hp_event: 0000:00:02.0 
slot:10, event:Card not present

Suggested-by: Lukas Wunner <lu...@wunner.de>
Suggested-by: Steven Rostedt <rost...@goodmis.org>
Signed-off-by: Shuai Xue <xuesh...@linux.alibaba.com>
Reviewed-by: Lukas Wunner <lu...@wunner.de>
---
changes since v5:
- move define of enum to include/uapi/linux/pci.h

Hi, Bjorn,

As this patch missed v6.13, should I rebase on pci/main (v6.14-rc1)?

Thanks.
Shuai


Reply via email to