[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6719af9392f8e_da1f929448@iweiny-mobl.notmuch>
Date: Wed, 23 Oct 2024 21:23:15 -0500
From: Ira Weiny <ira.weiny@...el.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>, Ira Weiny
<ira.weiny@...el.com>
CC: Dave Jiang <dave.jiang@...el.com>, Fan Ni <fan.ni@...sung.com>, "Navneet
Singh" <navneet.singh@...el.com>, 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-doc@...r.kernel.org>, <nvdimm@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 28/28] tools/testing/cxl: Add DC Regions to mock mem
data
Jonathan Cameron wrote:
> On Mon, 07 Oct 2024 18:16:34 -0500
> Ira Weiny <ira.weiny@...el.com> wrote:
>
[snip]
> >
> > Signed-off-by: Ira Weiny <ira.weiny@...el.com>
>
> Superficial review only.
>
> Looks fine to me but I've been reviewing too long today to be at all sure
> I'd spot if it was wrong in a subtle way. So no tag for now.
Thanks.
>
> > +static void dc_delete_extent(struct device *dev, unsigned long long start,
> > + unsigned long long length)
> > +{
> > + struct cxl_mockmem_data *mdata = dev_get_drvdata(dev);
> > + unsigned long long end = start + length;
> > + struct cxl_extent_data *ext;
> > + unsigned long index;
> > +
> > + dev_dbg(dev, "Deleting extent at %#llx len:%#llx\n", start, length);
> > +
> > + guard(mutex)(&mdata->ext_lock);
> > + xa_for_each(&mdata->dc_extents, index, ext) {
> > + u64 extent_end = ext->dpa_start + ext->length;
> > +
> > + /*
> > + * Any extent which 'touches' the released delete range will be
> > + * removed.
> > + */
> > + if ((start <= ext->dpa_start && ext->dpa_start < end) ||
> > + (start <= extent_end && extent_end < end)) {
> Really trivial but no {} for single line statement
Sure. done.
>
> > + xa_erase(&mdata->dc_extents, ext->dpa_start);
> > + }
> > + }
> > +
> > + /*
> > + * If the extent was accepted let it be for the host to drop
> > + * later.
> > + */
> > +}
>
> > @@ -1703,14 +2146,261 @@ static ssize_t sanitize_timeout_store(struct device *dev,
> >
> > return count;
> > }
> > -
> Noise.
Fixed.
Ira
Powered by blists - more mailing lists