From: Dan Williams <dan.j.williams@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, <linux-cxl@vger.kernel.org>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v12 4/6] cxl/region: Provide region info to the cxl_poison trace event
Date: Wed, 12 Apr 2023 15:09:24 -0700 [thread overview]
Message-ID: <64372c1496809_5f7562945f@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <ZDb64ZQpNwZemQeg@aschofie-mobl2>
Alison Schofield wrote:
[..]
> > Ah, cxl_get_poison_by_endpoint() is a function pointer to
> > device_for_each_child(), that really feels like a detail that's private
> > to the implementation.
> >
> > I would reorganize this to something like:
> >
> > if (port->commit_end == -1) {
> > /* No regions mapped to this memdev */
> > rc = cxl_get_poison_by_memdev(cxlmd);
> > } else {
> > /* Regions mapped, collect poison by endpoint */
> > rc = cxl_get_poison_by_endpoint(endpoint);
> > }
> >
> > ...and then internal to cxl_get_poison_by_endpoint() do:
> >
> > ctx = (struct cxl_trigger_poison_context) {
> > .port = endpoint,
> > };
> > rc = device_for_each_child(&port->dev, &ctx,
> > poison_by_decoder);
> > if (rc == 1)
> > rc = cxl_get_poison_unmapped(cxlmd, &ctx);
> >
> > ...then the header file reads more calmly with the added type-safety.
>
> I'll take another stab at this.
>
> A couple of versions back, I pulled cxl_get_poison_unmapped() out of
> cxl_get_poison_by_endpoint() since it was not really work of the
> region driver. (Ira called that out in a review)
I think it's ok to have poison_by_decoder() and
cxl_get_poison_unmapped() within cxl_get_poison_by_endpoint() because
decoder-mapped and unmapped-capacity are both a part of the endpoint.
Given that the region core and the region driver are both glommed into
drivers/cxl/core/region.c I would not worry too much about the unmapped
scanning being in that file if it keeps all the poison code better
colocated.
next prev parent reply other threads:[~2023-04-12 22:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 20:55 [PATCH v12 0/6] CXL Poison List Retrieval & Tracing alison.schofield
2023-04-10 20:55 ` [PATCH v12 1/6] cxl/mbox: Add GET_POISON_LIST mailbox command alison.schofield
2023-04-12 1:47 ` Dan Williams
2023-04-12 4:45 ` Alison Schofield
2023-04-12 5:18 ` Dan Williams
2023-04-12 18:01 ` Alison Schofield
2023-04-12 19:16 ` Dan Williams
2023-04-12 18:06 ` Alison Schofield
2023-04-13 16:48 ` Alison Schofield
2023-04-13 18:34 ` Dan Williams
2023-04-17 16:32 ` Alison Schofield
2023-04-17 19:39 ` Dan Williams
2023-04-10 20:55 ` [PATCH v12 2/6] cxl/trace: Add TRACE support for CXL media-error records alison.schofield
2023-04-10 20:55 ` [PATCH v12 3/6] cxl/memdev: Add trigger_poison_list sysfs attribute alison.schofield
2023-04-12 5:37 ` Dan Williams
2023-04-12 18:32 ` Alison Schofield
2023-04-12 19:34 ` Dan Williams
2023-04-10 20:55 ` [PATCH v12 4/6] cxl/region: Provide region info to the cxl_poison trace event alison.schofield
2023-04-12 5:55 ` Dan Williams
2023-04-12 18:39 ` Alison Schofield
2023-04-12 22:09 ` Dan Williams [this message]
2023-04-10 20:55 ` [PATCH v12 5/6] cxl/trace: Add an HPA to cxl_poison trace events alison.schofield
2023-04-10 20:55 ` [PATCH v12 6/6] tools/testing/cxl: Mock support for Get Poison List alison.schofield
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=64372c1496809_5f7562945f@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=rostedt@goodmis.org \
--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