linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: "Matthew W Carlis" <mattc@purestorage.com>,
	lukas@wunner.de, "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: Fri, 18 Jul 2025 11:35:32 -0500	[thread overview]
Message-ID: <20250718163532.GA2700834@bhelgaas> (raw)
In-Reply-To: <e92f8d1f-457c-4248-8397-81b0e20ff4af@linux.alibaba.com>

On Fri, Jul 18, 2025 at 01:29:18PM +0800, Shuai Xue wrote:
> 在 2025/7/18 11:46, Matthew W Carlis 写道:
> > On Thu, Jul 17, 2025 Bjorn Helgaas wrote
> > > So I think your idea of adding current link speed/width to the "Link
> > > Up" event is still on the table, and that does sound useful to me.
> > 
> > We're already reading the link status register here to check DLLA so
> > it would be nice. I guess if everything is healthy we're probably already
> > at the maximum speed by this point.
> > 
> > > In the future we might add another tracepoint when we enumerate the
> > > device and know the Vendor/Device ID.
> > 
> > I think we might have someone who would be interested in doing it.
> 
> IIUC, the current hotplug event (or presence event) is enough for Matthew.
> and we would like a new tracepoing for link speed change which reports
> speeds.
> 
> For hotplug event, I plan to send a new version to
> 
> 1. address Bjorn' concerns about event strings by removing its spaces.
> 
> #define PCI_HOTPLUG_EVENT							\
> 	EM(PCI_HOTPLUG_LINK_UP,			"PCI_HOTPLUG_LINK_UP")		\
> 	EM(PCI_HOTPLUG_LINK_DOWN,		"PCI_HOTPLUG_LINK_DOWN")	\
> 	EM(PCI_HOTPLUG_CARD_PRESENT,		"PCI_HOTPLUG_CARD_PRESENT")	\
> 	EMe(PCI_HOTPLUG_CARD_NOT_PRESENT,	"PCI_HOTPLUG_CARD_NOT_PRESENT")
> 
> 2. address Ilpo comments by moving pci_hp_event to a common place
> (include/trace/events/pci.h) so that the new comming can also use it.
> 
> For link speed change event (perhaps named as pci_link_event),
> I plan to send a seperate patch, which provides:
> 
> 	TP_STRUCT__entry(
> 		__string(	port_name,	port_name	)
> 		__field(	unsigned char,	cur_bus_speed	)
> 		__field(	unsigned char,	max_bus_speed	)
>  		__field(	unsigned char,	width		)
>  		__field(	unsigned int,	flit_mode	)
> 		__field(	unsigned char,	reason		)
> 		),
> 
> The reason field is from Lukas ideas which indicates why the link speed
> changed, e.g. "hotplug", "autonomous", "thermal", "retrain", etc.
> 
> Are you happy with above changes?

Seems good to me.

What do you plan for PCI_HOTPLUG_LINK_UP?  It would be nice to have
the link info there since that's sort of a link speed change itself.

Bjorn

  reply	other threads:[~2025-07-18 16:35 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 [this message]
2025-07-19  5:23                 ` Shuai Xue
2025-07-19  7:11                   ` Lukas Wunner
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=20250718163532.GA2700834@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --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=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 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).