From: Lukas Wunner <lukas@wunner.de>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
"Matthew W Carlis" <mattc@purestorage.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
anil.s.keshavamurthy@intel.com, bhelgaas@google.com,
bp@alien8.de, davem@davemloft.net, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, mark.rutland@arm.com,
mathieu.desnoyers@efficios.com, mhiramat@kernel.org,
naveen@kernel.org, oleg@redhat.com, peterz@infradead.org,
rostedt@goodmis.org, tianruidong@linux.alibaba.com,
tony.luck@intel.com
Subject: Re: [PATCH v8] PCI: hotplug: Add a generic RAS tracepoint for hotplug event
Date: Sat, 19 Jul 2025 09:11:23 +0200 [thread overview]
Message-ID: <aHtFG3QsdohG466k@wunner.de> (raw)
In-Reply-To: <fc0ded97-8643-4faa-a606-732bcd4ce4a1@linux.alibaba.com>
On Sat, Jul 19, 2025 at 01:23:28PM +0800, Shuai Xue wrote:
> <...>-120 [002] ..... 104.864051: pci_hp_event: 0000:00:03.0 slot:30, event:PCI_HOTPLUG_CARD_PRESENT
> <...>-120 [002] ..... 104.864081: pci_hp_event: 0000:00:03.0 slot:30, event:PCI_HOTPLUG_LINK_UP
Somehow I liked the simple "Link Up" and "Card present" strings more
than this. :)
The PCI_HOTPLUG substring repeats what pci_hp_event already betrays,
that this is a hotplug event.
> irq/57-pciehp-120 [002] ..... 104.990434: pci_link_event: 0000:00:03.0 cur_bus_speed:20, max_bus_speed:23, width:1, flit_mode:0, reason:5
> irq/57-pciehp-120 [002] ..... 104.992377: pci_link_event: 0000:00:03.0 cur_bus_speed:20, max_bus_speed:23, width:1, flit_mode:0, reason:0
This contains a lot of terminology specific to PCI *Express*
(versus Conventional PCI or PCI-X). Either it needs to be
"pcie_link_event" or we need to come up with a structure that
works for non-PCIe as well.
PCI links can be tunneled over Thunderbolt, in this case the
link speed is fixed to 2.5 GT/s (USB4 v1.0 sec 11.2.1), but
in reality is governed by the speed of the Thunderbolt fabric
(which can even be asymmetric). Do we want to report the
virtual 2.5 GT/s in this case or the actual Thunderbolt speed?
Or do we want a separate trace event for Thunderbolt?
For Root and Downstream Ports, the physical "port" points "downstream",
whereas for Upstream Ports and Endpoints, the physical "port" points
"upstream". Software interpreting the trace event may want to know
the direction (or whatever one wants to call it) because it cannot
tell from the address 0000:00:03.0 what the PCIe type is. Having to
look this up in lspci seems cumbersome. So it may be worthwhile to
include either the port's direction or the device's PCIe type in the
trace event.
Of course, hotplug only exists at Root or Downstream Ports, so any
trace event generated from the PCIe hotplug driver will pertain to
a downstream-facing port. But the bandwidth controller also binds
to Upstream Ports and its trace events may thus pertain to link speed
changes at an upstream-facing port.
Thanks,
Lukas
next prev parent reply other threads:[~2025-07-19 7:11 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 1:38 [PATCH v8] PCI: hotplug: Add a generic RAS tracepoint for hotplug event Shuai Xue
2025-05-19 17:10 ` Ilpo Järvinen
2025-05-20 2:36 ` Shuai Xue
2025-05-20 10:07 ` Ilpo Järvinen
2025-05-20 10:44 ` Lukas Wunner
2025-05-20 10:59 ` Ilpo Järvinen
2025-05-20 12:09 ` Lukas Wunner
2025-05-20 12:52 ` Ilpo Järvinen
2025-05-20 13:11 ` Lukas Wunner
2025-05-22 9:50 ` Shuai Xue
2025-05-31 14:15 ` Lukas Wunner
2025-07-16 6:52 ` Shuai Xue
2025-05-22 9:41 ` Shuai Xue
2025-06-02 6:30 ` Ilpo Järvinen
2025-06-23 3:04 ` Shuai Xue
2025-07-16 22:25 ` Bjorn Helgaas
2025-07-17 6:00 ` Shuai Xue
2025-07-17 19:29 ` Bjorn Helgaas
2025-07-21 8:55 ` Ilpo Järvinen
2025-07-24 22:27 ` Bjorn Helgaas
2025-07-25 4:33 ` Shuai Xue
2025-07-17 17:28 ` Matthew W Carlis
2025-07-17 19:07 ` Bjorn Helgaas
2025-07-17 20:23 ` Lukas Wunner
2025-07-17 23:27 ` Matthew W Carlis
2025-07-17 23:50 ` Bjorn Helgaas
2025-07-18 3:46 ` Matthew W Carlis
2025-07-18 5:29 ` Shuai Xue
2025-07-18 16:35 ` Bjorn Helgaas
2025-07-19 5:23 ` Shuai Xue
2025-07-19 7:11 ` Lukas Wunner [this message]
2025-07-21 13:17 ` Shuai Xue
2025-07-26 7:55 ` Lukas Wunner
2025-07-21 10:18 ` Ilpo Järvinen
2025-07-22 2:43 ` [PATCH v8] PCI: hotplug: Add a generic RAS tracepoinggt " Shuai Xue
2025-07-22 12:29 ` Ilpo Järvinen
2025-07-23 1:29 ` 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=aHtFG3QsdohG466k@wunner.de \
--to=lukas@wunner.de \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).