From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Gregory Price <gourry@gourry.net>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>,
Dan Williams <dan.j.williams@intel.com>,
Davidlohr Bueso <dave@stgolabs.net>, <dave.jiang@intel.com>,
<alison.schofield@intel.com>, <ira.weiny@intel.com>,
<vishal.l.verma@intel.com>, <seven.yi.lee@gmail.com>,
<hch@infradead.org>, <a.manzanares@samsung.com>,
<fan.ni@samsung.com>, <linux-cxl@vger.kernel.org>
Subject: Re: Deep flush support for CXL pmem?
Date: Fri, 17 Oct 2025 18:00:01 +0100 [thread overview]
Message-ID: <20251017180001.00006d6c@huawei.com> (raw)
In-Reply-To: <aPJR1ihx1j3UqUjx@gourry-fedora-PF4VCD3F>
On Fri, 17 Oct 2025 10:25:26 -0400
Gregory Price <gourry@gourry.net> wrote:
> On Fri, Oct 17, 2025 at 02:11:16PM +0800, Huang, Ying wrote:
> > Hi, All,
> >
> > When reading the documentation of PMDK (https://github.com/pmem/pmdk), I
> > found that deep flush is used for data loss recovery in addition to GPF.
> > With that, we can identify that a file isn't affected by the GPF failure
> > because it wasn't opened during the GPF failure.
> >
> > However, IIUC, the Linux kernel doesn't support deep flush (via
> > nvdimm_flush()) for CXL pmem at least for now. For NVDIMM, we have WPQ,
> > but it appears that we don't have that for CXL. Is deep flush for CXL
> > defined in some spec?
> >
>
> Should note that this is relevant not just for pmem, but also for shared
> memory use cases. Last I looked there's nothing defined / implemented.
>
> When I reviewed the cxl.mem protocol about a year or so ago, I came away
> thinking a deep flush was going to be problematic for shared devices
> (multiple separate coherency domains / non-coherent memory).
Two things to deal with. Getting it to the device. For that what happens
is CPU architecture / host system architecture dependent. Not all (possibly
none) of the architectures have this well defined today - on some it
just works (cross your fingers that this is always the case). In some systems
using the persistent flushes gets it out on the bus whether or not the
CXL device is persistent.
There are ways around that, such as 'device' like entities on particular
systems that do this. We have one in our Hydra Home Agent that is handled
by the cache maintenance 'subsystem' series (I'll send v4 of that early
next week). You can use that to guarantee caches are written back to
the device. We don't currently use it outside of capacity additions / removal
(DCD or address decoder programming routes).
The other thing is getting the device to actually write it to persistent
memory rather than relying on local or remote power to keep things up long
enough for writes to complete.
So I understand that there are gaps in what is guaranteed to do the job for both
deep flushes to persist memory and for shared memory use cases.
Jonathan
>
> ~Gregory
next prev parent reply other threads:[~2025-10-17 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 6:11 Deep flush support for CXL pmem? Huang, Ying
2025-10-17 14:25 ` Gregory Price
2025-10-17 17:00 ` Jonathan Cameron [this message]
2025-10-17 19:10 ` dan.j.williams
2025-10-20 2:38 ` Davidlohr Bueso
2025-10-20 11:14 ` Huang, Ying
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=20251017180001.00006d6c@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=gourry@gourry.net \
--cc=hch@infradead.org \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=seven.yi.lee@gmail.com \
--cc=vishal.l.verma@intel.com \
--cc=ying.huang@linux.alibaba.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