Linux CXL
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	"Dave Jiang" <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@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>
Subject: Re: [PATCH 1/2] cxl/region: Timeout auto region assembly waiting for endpoints
Date: Thu, 29 Jan 2026 20:58:09 -0800	[thread overview]
Message-ID: <697c3a6155b46_1d6f100e1@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <3bcc5143777acc6d45675d78dd8c57079406bc53.1769746294.git.alison.schofield@intel.com>

Alison Schofield wrote:
> Currently, if not all expected endpoints arrive for an auto-created
> region, the region remains registered but disabled indefinitely. The
> region continues to reserve its memory resource, preventing DAX from
> registering the memory, and provides no indication that endpoints
> failed to arrive (useful for non-DAX configurations).

Does it block DAX? The HPA reservation does not mark the resource busy,
so DAX should still be able to operate. It might make a mess of resource
tree, but not block unless we are in this case of the boundaries
misaligning. I would rather rethink the insert_resource() in
__construct_region() if it is indeed a blocking problem. It is already
the case that an insert_resource() failure is not fatal to region
creation.

> Start a 30 second timeout when the first endpoint attaches. If the
> remaining endpoints have not attached before the timeout expires,
> abort region assembly and unregister the region.

The time to give up on regions present at boot should be at the end of
wait_for_device_probe(). There is no point waiting any longer for a
device that was alive a few seconds ago according to the BIOS.

> Cancel the timeout when all expected endpoints attach or the region is
> unregistered for any reason.

Setting aside the above, this looks like policy, and every time I see
policy the first question is "can userspace do it?". It would be
straightforward for userspace to kick a 30 second watchdog upon each
region KOBJ_ADD event. Each time that fires go cleanup partially
assembled regions.

For example there is no automatic cleanup of partially assembled RAID
arrays. So, precedent leans towards letting userspace decide what
happens when composite devices fail assembly.

  parent reply	other threads:[~2026-01-30  4:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30  4:23 [PATCH 1/2] cxl/region: Timeout auto region assembly waiting for endpoints Alison Schofield
2026-01-30  4:23 ` [PATCH 2/2] cxl/region: Unregister auto-created region when assembly fails Alison Schofield
2026-01-30 17:45   ` dan.j.williams
2026-01-31  1:04     ` Alison Schofield
2026-01-31 15:49       ` Gregory Price
2026-02-05  0:32         ` Alison Schofield
2026-02-05  4:22           ` Gregory Price
2026-02-03  3:07       ` dan.j.williams
2026-02-05  0:20         ` Alison Schofield
2026-02-05  1:03           ` dan.j.williams
2026-01-30  4:58 ` dan.j.williams [this message]
2026-01-30 17:42   ` [PATCH 1/2] cxl/region: Timeout auto region assembly waiting for endpoints Gregory Price
2026-01-30 18:26     ` dan.j.williams
2026-01-30 19:03       ` Gregory Price
2026-01-30 22:46         ` dan.j.williams

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=697c3a6155b46_1d6f100e1@dwillia2-mobl4.notmuch \
    --to=dan.j.williams@intel.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