From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: <nvdimm@lists.linux.dev>, <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH] test/cxl-sanitize: avoid sanitize submit/wait race
Date: Mon, 11 May 2026 20:32:12 -0700 [thread overview]
Message-ID: <agKfPIco7XnwHZLd@aschofie-mobl2.lan> (raw)
In-Reply-To: <7de20386-21d9-4e37-96bf-1e6397d4408e@intel.com>
On Thu, Apr 30, 2026 at 09:31:42AM -0700, Dave Jiang wrote:
>
>
> On 4/29/26 7:18 PM, Alison Schofield wrote:
> > This test verifies that wait-sanitize blocks for the programmed
> > timeout after issuing sanitize on an inactive memdev.
> >
> > The sanitize request is issued in the background and wait-sanitize
> > is called immediately after. In cxl_test, sanitize completes
> > asynchronously via delayed work, and the sysfs write does not block.
> > This creates a race where wait-sanitize may run before sanitize is
> > observed and return immediately.
> >
> > This test has been reliable since its introduction, but recently
> > started failing consistently in one environment, suggesting a
> > timing sensitivity. It fails here:
> >
> > ((SECONDS > start + 2)) || err $LINENO
> >
> > Add a short delay after backgrounding the sanitize write to make
> > sure that wait-sanitize can observe the in-progress operation.
> >
> > A sysfs-based synchronization was considered, but no in-progress
> > state is exposed to user space.
> >
> > Signed-off-by: Alison Schofield <alison.schofield@intel.com>
>
> Looks reasonable
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Thanks!
Applied to: https://github.com/pmem/ndctl/tree/pending
prev parent reply other threads:[~2026-05-12 3:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 2:18 [ndctl PATCH] test/cxl-sanitize: avoid sanitize submit/wait race Alison Schofield
2026-04-30 16:31 ` Dave Jiang
2026-05-12 3:32 ` Alison Schofield [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=agKfPIco7XnwHZLd@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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