From: Jongwon Lee <ai@linux.com>
To: Li Ming <ming.li@zohomail.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jic23@kernel.org>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dan Williams <djbw@kernel.org>, Ira Weiny <iweiny@kernel.org>,
Richard Cheng <icheng@nvidia.com>,
linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] cxl/edac: Mask DPA flags in the event record cache key
Date: Thu, 05 Nov 2026 17:42:13 +0900 [thread overview]
Message-ID: <20261105084212.55292-lm2-ai@linux.com> (raw)
In-Reply-To: <f4be9108-e5ea-4e6d-bd6d-0af14f28951d@zohomail.com>
Hi Ming,
Thanks for the careful review.
On 11/5/26 16:20, Li Ming wrote:
>> +static inline unsigned long cxl_rec_key(const struct cxl_event_media_hdr *hdr)
>> +{
>> + return le64_to_cpu(hdr->phys_addr) & CXL_DPA_MASK;
>> +}
> This function actually returns the real DPA of the event record, I think
> the name should be cxl_rec_dpa()? xa_load() uses attrbs->dpa as the
> index, but xa_store() uses cxl_rec_key() as the index, that could make
> readers confused.
Agreed, cxl_rec_dpa() says what it returns. I'll rename it in v5.
> I think the implementation of skipping unrepairable records should be
> moved into a separate patch, and this patch focuses on using real DPA as
> the index parameter of the xarray.
Makes sense, I'll split it out. I would like to put that patch before
the masking one, though. Once the key is masked, the DPA from the trace
event matches a NOT_REPAIRABLE record, so if the masking went in first,
those records could be repaired at that commit.
> My first feeling is that we should not simply ignore unrepairable
> records without any logs. But I am not very familiar with this area, not
> sure if we should report this repairable bit in trace log or output a
> kernel log while finding an unrepairable record.
Good point. The trace events already carry the flag: cxl_general_media
and cxl_dram print dpa_flags='NOT_REPAIRABLE' for such a record, so user
space can see it before it requests a repair, and the request then fails
with -EINVAL. If the maintainers would like a message on that path as
well, I can add a dev_dbg() in v5.
I'll wait a few days for other comments before sending v5.
Thanks,
Jongwon
prev parent reply other threads:[~2026-11-05 8:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 12:32 [PATCH v4 0/2] cxl/edac: Fix event record lookups for memory repair Jongwon Lee
2026-11-02 12:32 ` [PATCH v4 1/2] cxl/edac: Read cached DRAM event records under the xarray lock Jongwon Lee
2026-11-05 6:00 ` Richard Cheng
2026-11-05 7:42 ` Li Ming
2026-11-05 8:42 ` Jongwon Lee
2026-11-02 12:32 ` [PATCH v4 2/2] cxl/edac: Mask DPA flags in the event record cache key Jongwon Lee
2026-11-05 6:00 ` Richard Cheng
2026-11-05 8:20 ` Li Ming
2026-11-05 8:42 ` Jongwon Lee [this message]
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=20261105084212.55292-lm2-ai@linux.com \
--to=ai@linux.com \
--cc=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=djbw@kernel.org \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=vishal.l.verma@intel.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
all inboxes | Powered by JetHome®