From: Dan Williams <dan.j.williams@intel.com>
To: <alison.schofield@intel.com>, Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, Dmytro Adamenko <dmytro.adamenko@intel.com>
Subject: RE: [PATCH v2 3/3] cxl/region: Use calc_interleave_pos() with autodiscovered regions
Date: Mon, 23 Oct 2023 14:58:08 -0700 [thread overview]
Message-ID: <6536ec70bc34_7258329498@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <533d9fe49c10d7cb878ea9157232aaa5bb657ae0.1697433770.git.alison.schofield@intel.com>
alison.schofield@ wrote:
> From: Alison Schofield <alison.schofield@intel.com>
>
> For auto-discovered regions, the driver must assign each target to
> the correct position in the region interleave set.
I would say:
"For auto-discovered regions, the driver must assign each target to
a valid position in the region interleave set, based on the decoder
topology."
...because there are lots of valid configurations that may not be
"correct". I.e. outside of pmem where there are labels to validate the
intended position, label-less autodiscovery can only interpret the
current state of the decode topology.
>
> cxl_region_sort_targets() uses the kernel sort() function to put the
> targets in relative order.
This can more agressively throw the current implementation under the
bus.
"The current implementation fails to parse valid decode topologies, as
it does not consider the child offset into a parent port. The sort puts
all targets of one port ahead of another port when an interleave was
expected, causing the region assembly to fail."
[..]
> Replace the relative sort, with calc_interleave_pos() on each target
> in the region target list. That will find the exact position for each
> target based on a walk up the ancestral tree from endpoint to root
> decoder.
>
> calc_interleave_pos() was introduced in a prior patch, so the work
> here is to use in cxl_region_sort_targets().
>
> Cleanup the obsolete helper functions from the prior sort().
Maybe a comment on the testing this passes, or the plan for keeping this
algorithm regression tested?
>
> Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery")
> Reported-by: Dmytro Adamenko <dmytro.adamenko@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
[..]
Code looks good.
next prev parent reply other threads:[~2023-10-23 21:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 6:02 [PATCH v2 0/3] cxl/region: Autodiscovery position repair alison.schofield
2023-10-16 6:02 ` [PATCH v2 1/3] cxl/region: Prepare the decoder match range helper for reuse alison.schofield
2023-10-17 16:21 ` Jim Harris
2023-10-17 17:24 ` Jim Harris
2023-10-23 23:22 ` Alison Schofield
2023-10-17 20:43 ` Alison Schofield
2023-10-17 22:59 ` Jim Harris
2023-10-23 17:51 ` Alison Schofield
2023-10-23 20:54 ` Dan Williams
2023-10-23 23:30 ` Alison Schofield
2023-10-16 6:02 ` [PATCH v2 2/3] cxl/region: Calculate a target position in a region interleave alison.schofield
2023-10-17 17:33 ` Jim Harris
2023-10-23 18:10 ` Alison Schofield
2023-10-23 18:34 ` Jim Harris
2023-10-23 21:47 ` Dan Williams
2023-10-16 6:02 ` [PATCH v2 3/3] cxl/region: Use calc_interleave_pos() with autodiscovered regions alison.schofield
2023-10-17 17:40 ` Jim Harris
2023-10-23 21:58 ` Dan Williams [this message]
2023-10-24 0:42 ` 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=6536ec70bc34_7258329498@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=dmytro.adamenko@intel.com \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.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