From: Dan Williams <dan.j.williams@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
<dan.j.williams@intel.com>
Cc: 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>,
"Smita Koralahalli" <Smita.KoralahalliChannabasappa@amd.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH] cxl/region: Delay inserting iomem resource until auto region commit
Date: Thu, 12 Mar 2026 16:55:59 -0700 [thread overview]
Message-ID: <69b3528f80285_b2b61009c@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <aZzF1Hw6tZu9QXbS@aschofie-mobl2.lan>
Alison Schofield wrote:
[..]
> >
> > The ambiguity of iomem resource parenting can be resolved by looking the
> > device-path for dax19.0 ("daxctl list -RDu"). It is also resolved by
> > noticing that the CXL region and the DAX region are using separate
> > memregion_id values (9 vs 19).
> >
> > The extra effort for incremental precision is not needed, the contents
> > of /proc/iomem are accurate.
> >
>
> Incremental Precision? Isn't it just wrong?
I would say it is "acceptably" wrong. More below...
> The region driver does not have a claim on that address range. It
> inserted the resource before it became a decoder owner. If it wanted
> to place a provisional hold and then drop it on failure to commit,
> that would at least be internally consistent.
When I say it is "acceptably" wrong the user created region flow also has
an unbounded time between when size_store() inserts the resource from
alloc_free_mem_region() to whenever the region becomes committed. In the
same way that the kernel can not know that "cxl create-region" crashed
and is never going to commit that region it started, the kernel can not
know when some wayward device is going to finally arrive to finish off
the region creation process.
The determination on when to give up and when to clean up is policy.
Kernel is allergic to policy, it is a userspace responsibility.
/proc/iomem correctly shows that CXL subsystem was interested in this
address range for a region and can decide "I am done waiting for
regionX, let me go clean that up and repurpose the devices and address
space for something else."
> In retrospect, inserting the resource prior to commit was a bug in the
> region lifecycle. I can re-present this as that, so folks do not get
> side-tracked debating how users interpret memory topology.
I do not think it is a bug. It serves exactly the same purpose as
alloc_hpa() for manual region creation. It says "CXL subsystem is
interested in instantiating a region here, stay tuned...".
prev parent reply other threads:[~2026-03-12 23:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 6:22 [PATCH] cxl/region: Delay inserting iomem resource until auto region commit Alison Schofield
2026-02-12 17:18 ` Gregory Price
2026-02-12 18:58 ` Alison Schofield
2026-02-12 19:29 ` dan.j.williams
2026-02-23 21:25 ` Alison Schofield
2026-03-12 23:55 ` Dan Williams [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=69b3528f80285_b2b61009c@dwillia2-mobl4.notmuch \
--to=dan.j.williams@intel.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--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