Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

Ira Weiny
2024-08-23T21:32:03Z

Dave Jiang wrote:
>
>
> On 8/16/24 7:44 AM, ira.weiny@intel.com wrote:
> > From: Navneet Singh <navneet.singh@intel.com>
> >
> > Dynamic capacity device extents may be left in an accepted state on a
> > device due to an unexpected host crash. In this case it is expected
> > that the creation of a new region on top of a DC partition can read
> > those extents and surface them for continued use.
> >
> > Once all endpoint decoders are part of a region and the region is being
> > realized a read of the devices extent list can reveal these previously
> > accepted extents.
>
> Once all endpoint decoders are part of a region and the region is being
> realized, a read of the 'devices extend list' can reveal these previously
> accepted extents.
>

Thanks, done.

[snip]

> > +
> > +/**
> > + * cxl_read_extent_list() - Read existing extents
> > + * @cxled: Endpoint decoder which is part of a region
> > + *
> > + * Issue the Get Dynamic Capacity Extent List command to the device
> > + * and add existing extents if found.
> > + */
> > +void cxl_read_extent_list(struct cxl_endpoint_decoder *cxled)
>
> cxl_process_extend_list()? It seems to do read+validate+add.

yea maybe. The name of this function actually changed in my mind many
times. In the end I went for the higher level meaning which was to read
the existing extent list.

I'll change it because I'm not convinced of any particular name.

>
> > +{
> > + int retry = 10;
>
> arbitrary retry number? maybe define it?

Sure. But it is still an arbitrary value of 10.

I'll document my justification thusly.

/*
...
* A retry of 10 is somewhat arbitrary, however, extent changes should be
* relatively rare while bringing up a region. So 10 should be plenty.
*/
#define CXL_READ_EXTENT_LIST_RETRY 10

Ira

[snip]