[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zs34b4DoMmd9GO28@fan>
Date: Tue, 27 Aug 2024 09:02:11 -0700
From: Fan Ni <nifan.cxl@...il.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Fan Ni <nifan.cxl@...il.com>, ira.weiny@...el.com,
Dave Jiang <dave.jiang@...el.com>,
Navneet Singh <navneet.singh@...el.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Davidlohr Bueso <dave@...olabs.net>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
linux-btrfs@...r.kernel.org, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
nvdimm@...ts.linux.dev
Subject: Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize
region extents
On Tue, Aug 27, 2024 at 01:08:29PM +0100, Jonathan Cameron wrote:
> On Fri, 23 Aug 2024 14:32:32 -0700
> Fan Ni <nifan.cxl@...il.com> wrote:
>
> > On Fri, Aug 16, 2024 at 09:44:26AM -0500, ira.weiny@...el.com wrote:
> > > From: Navneet Singh <navneet.singh@...el.com>
> > >
> > > A dynamic capacity device (DCD) sends events to signal the host for
> > > changes in the availability of Dynamic Capacity (DC) memory. These
> > > events contain extents describing a DPA range and meta data for memory
> > > to be added or removed. Events may be sent from the device at any time.
> > >
> > > Three types of events can be signaled, Add, Release, and Force Release.
> > >
> > > On add, the host may accept or reject the memory being offered. If no
> > > region exists, or the extent is invalid, the extent should be rejected.
> > > Add extent events may be grouped by a 'more' bit which indicates those
> > > extents should be processed as a group.
> > >
> > > On remove, the host can delay the response until the host is safely not
> > > using the memory. If no region exists the release can be sent
> > > immediately. The host may also release extents (or partial extents) at
> > > any time. Thus the 'more' bit grouping of release events is of less
> > > value and can be ignored in favor of sending multiple release capacity
> > > responses for groups of release events.
> > >
> > > Force removal is intended as a mechanism between the FM and the device
> > > and intended only when the host is unresponsive, out of sync, or
> > > otherwise broken. Purposely ignore force removal events.
> > >
> > > Regions are made up of one or more devices which may be surfacing memory
> > > to the host. Once all devices in a region have surfaced an extent the
> > > region can expose a corresponding extent for the user to consume.
> > > Without interleaving a device extent forms a 1:1 relationship with the
> > > region extent. Immediately surface a region extent upon getting a
> > > device extent.
> > >
> > > Per the specification the device is allowed to offer or remove extents
> > > at any time. However, anticipated use cases can expect extents to be
> > > offered, accepted, and removed in well defined chunks.
> > >
> > > Simplify extent tracking with the following restrictions.
> > >
> > > 1) Flag for removal any extent which overlaps a requested
> > > release range.
> > > 2) Refuse the offer of extents which overlap already accepted
> > > memory ranges.
> > > 3) Accept again a range which has already been accepted by the
> > > host. (It is likely the device has an error because it
> > > should already know that this range was accepted. But from
> > > the host point of view it is safe to acknowledge that
> > > acceptance again.)
> > >
> > > Management of the region extent devices must be synchronized with
> > > potential uses of the memory within the DAX layer. Create region extent
> > > devices as children of the cxl_dax_region device such that the DAX
> > > region driver can co-drive them and synchronize with the DAX layer.
> > > Synchronization and management is handled in a subsequent patch.
> > >
> > > Process DCD events and create region devices.
> > >
> > > Signed-off-by: Navneet Singh <navneet.singh@...el.com>
> > > Co-developed-by: Ira Weiny <ira.weiny@...el.com>
> > > Signed-off-by: Ira Weiny <ira.weiny@...el.com>
> > >
> >
> > One minor change inline.
> Hi Fan,
>
> Crop please. I scanned past it 3 times when scrolling without noticing
> what you'd actually commented on.
Sure. I will crop in the future.
Thanks for the tips, Jonathan.
Fan
>
> > > +/* See CXL 3.0 8.2.9.2.1.5 */
> >
> > Update the reference to reflect CXL 3.1.
> >
> > Fan
> >
Powered by blists - more mailing lists