From: Ira Weiny <ira.weiny@intel.com>
To: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>,
Shiju Jose <shiju.jose@huawei.com>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
"Ard Biesheuvel" <ardb@kernel.org>, <linux-efi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-cxl@vger.kernel.org>,
Ira Weiny <ira.weiny@intel.com>
Subject: RE: [PATCH 1/6] cxl/trace: Pass uuid explicitly to event traces
Date: Fri, 8 Dec 2023 10:21:49 -0800 [thread overview]
Message-ID: <65735ebd531b5_1e7d27294c7@iweiny-mobl.notmuch> (raw)
In-Reply-To: <657263c249c4c_45e0129471@dwillia2-xfh.jf.intel.com.notmuch>
Dan Williams wrote:
> Ira Weiny wrote:
> > CPER CXL events do not have a UUID associated with them. It is
> > desirable to share event structures between the CPER CXL event and the
> > CXL event log events.
>
> This parses strange to me, maybe it is trying to capture too many
> changes in too few sentences? Something like this instead?
Yea probably just trying to squeeze too much in.
>
> "CXL CPER events are identified by the CPER Section Type GUID. The GUID
> correlates with the CXL UUID for the event record. It turns out that a
> CXL CPER record is a strict subset of the CXL event record, only the
> UUID header field is chopped.
>
> In order to unify handling between native and CPER flavors of CXL
> events, prepare the code for the UUID to be passed in rather than
> inferred from the record itself.
>
> Later patches update the passed in record to only refer to the common
> data between the formats."
That looks much more detailed. I'll add it in.
[snip]
> > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> > index a0b5819bc70b..2aef185f4cd0 100644
> > --- a/drivers/cxl/core/trace.h
> > +++ b/drivers/cxl/core/trace.h
> > @@ -189,7 +189,7 @@ TRACE_EVENT(cxl_overflow,
> > __string(memdev, dev_name(&cxlmd->dev)) \
> > __string(host, dev_name(cxlmd->dev.parent)) \
> > __field(int, log) \
> > - __field_struct(uuid_t, hdr_uuid) \
> > + __field_struct(uuid_t, uuid) \
>
> Hmm, is it too late to make this rename? I.e. would a script that is
> looking for "hdr_uuid" in one kernel be broken by the rename of the
> field to "uuid" in the next?
True, probably best to leave the field name alone. I'll change it back.
>
> > __field(u64, serial) \
> > __field(u32, hdr_flags) \
> > __field(u16, hdr_handle) \
> > @@ -198,12 +198,12 @@ TRACE_EVENT(cxl_overflow,
> > __field(u8, hdr_length) \
> > __field(u8, hdr_maint_op_class)
> >
> > -#define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \
> > +#define CXL_EVT_TP_fast_assign(cxlmd, l, uuid, hdr) \
> > __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> > __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> > __entry->log = (l); \
> > __entry->serial = (cxlmd)->cxlds->serial; \
> > - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> > + memcpy(&__entry->uuid, (uuid), sizeof(uuid_t)); \
>
> Per above this would be:
>
> memcpy(&__entry->hdr_uuid, (uuid), sizeof(uuid_t)); \
yep.
>
> > __entry->hdr_length = (hdr).length; \
> > __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> > __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> > @@ -217,7 +217,7 @@ TRACE_EVENT(cxl_overflow,
> > "maint_op_class=%u : " fmt, \
> > __get_str(memdev), __get_str(host), __entry->serial, \
> > cxl_event_log_type_str(__entry->log), \
> > - __entry->hdr_timestamp, &__entry->hdr_uuid, __entry->hdr_length,\
> > + __entry->hdr_timestamp, &__entry->uuid, __entry->hdr_length, \
>
> ...and this change could be dropped.
Yep.
All done.
>
> Other than that, this looks good to me.
Thanks,
Ira
next prev parent reply other threads:[~2023-12-08 18:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 18:00 [PATCH 0/6] efi/cxl-cper: Report CPER CXL component events through trace events Ira Weiny
2023-11-29 18:00 ` [PATCH 1/6] cxl/trace: Pass uuid explicitly to event traces Ira Weiny
2023-12-08 0:30 ` Dan Williams
2023-12-08 18:21 ` Ira Weiny [this message]
2023-11-29 18:00 ` [PATCH 2/6] cxl/events: Promote CXL event structures to a core header Ira Weiny
2023-11-29 18:00 ` [PATCH 3/6] cxl/events: Separate UUID from event structures Ira Weiny
2023-11-29 18:00 ` [PATCH 4/6] cxl/events: Create a CXL event union Ira Weiny
2023-11-29 18:00 ` [PATCH 5/6] firmware/efi: Process CXL Component Events Ira Weiny
2023-12-08 1:40 ` Dan Williams
2023-12-08 18:47 ` Ira Weiny
2023-12-08 21:39 ` Dan Williams
2023-11-29 18:00 ` [PATCH 6/6] cxl/memdev: Register for and process CPER events Ira Weiny
2023-12-08 2:04 ` Dan Williams
2023-12-08 19:43 ` Ira Weiny
2023-12-08 21:46 ` Dan Williams
2023-12-11 19:01 ` Ira Weiny
2023-12-11 19:16 ` Dan Williams
2023-12-11 23:01 ` Ira Weiny
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=65735ebd531b5_1e7d27294c7@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=alison.schofield@intel.com \
--cc=ardb@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shiju.jose@huawei.com \
--cc=vishal.l.verma@intel.com \
--cc=yazen.ghannam@amd.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