On Wed, Jul 23, 2025 at 11:31:07AM +0800, Shuai Xue wrote:
> Hotplug events are critical indicators for analyzing hardware health,
> and surprise link downs can significantly impact system performance and
> reliability.
> 
> Define a new TRACING_SYSTEM named "pci", add a generic RAS tracepoint
> for hotplug event to help health checks. Add enum pci_hotplug_event in
> include/uapi/linux/pci.h so applications like rasdaemon can register
> tracepoint event handlers for it.
> 
> The output is 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

I asked about documentation earlier [1], but didn't see any response.
I think these tracepoints are important and will be widely used, so it
seems like some kind of user guide would be helpful.

> Suggested-by: Lukas Wunner <[email protected]>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Shuai Xue <[email protected]>
> Signed-off-by: Bjorn Helgaas <[email protected]>

Nit: I assume this came from the patch I had applied to pci/trace, but
you shouldn't include any sign-offs from people to whom you send
patches [2].

Bjorn

[1] https://lore.kernel.org/all/20250717192950.GA2594528@bhelgaas/#t
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=v6.13#n449

Reply via email to