Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

Jonathan Cameron
2024-08-23T16:14:53Z

On Thu, 22 Aug 2024 21:28:41 -0500
Ira Weiny <ira.weiny@intel.com> wrote:

> Dave Jiang wrote:
> >
> >
> > On 8/16/24 7:44 AM, ira.weiny@intel.com wrote:
> > > From: Navneet Singh <navneet.singh@intel.com>
> > >
> > > To properly configure CXL regions on Dynamic Capacity Devices (DCD),
> > > user space will need to know the details of the DC partitions available.
> > >
> > > Expose dynamic capacity capabilities through sysfs.
> > >
> > > Signed-off-by: Navneet Singh <navneet.singh@intel.com>
> > > Co-developed-by: Ira Weiny <ira.weiny@intel.com>
> > > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> > >
> > > ---
> > > Changes:
> > > [iweiny: remove review tags]
> > > [Davidlohr/Fan/Jonathan: omit 'dc' attribute directory if device is not DC]
> > > [Jonathan: update documentation for dc visibility]
> > > [Jonathan: Add a comment to DC region X attributes to ensure visibility checks work]
> > > [iweiny: push sysfs version to 6.12]
> > > ---
> > > Documentation/ABI/testing/sysfs-bus-cxl | 12 ++++
> > > drivers/cxl/core/memdev.c | 97 +++++++++++++++++++++++++++++++++
> > > 2 files changed, 109 insertions(+)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl b/Documentation/ABI/testing/sysfs-bus-cxl
> > > index 957717264709..6227ae0ab3fc 100644
> > > --- a/Documentation/ABI/testing/sysfs-bus-cxl
> > > +++ b/Documentation/ABI/testing/sysfs-bus-cxl
> > > @@ -54,6 +54,18 @@ Description:
> > > identically named field in the Identify Memory Device Output
> > > Payload in the CXL-2.0 specification.
> > >
> > > +What: /sys/bus/cxl/devices/memX/dc/region_count
> > > + /sys/bus/cxl/devices/memX/dc/regionY_size
> >
> > Just make it into 2 separate entries?
>
> Do you mean in the docs?

Assuming yes, then I think it would be cleaner as two separate entries
+ Maybe even one for the directory which can then have
the visibility statement.

>
> Ira
>
> >
> > DJ
> > > +Date: August, 2024
> > > +KernelVersion: v6.12
> > > +Contact: linux-cxl@vger.kernel.org
> > > +Description:
> > > + (RO) Dynamic Capacity (DC) region information. The dc
> > > + directory is only visible on devices which support Dynamic
> > > + Capacity.
> > > + The region_count is the number of Dynamic Capacity (DC)
> > > + partitions (regions) supported on the device.
> > > + regionY_size is the size of each of those partitions.
> > >
> > > What: /sys/bus/cxl/devices/memX/pmem/qos_class
> > > Date: May, 2023
>
> [snip]
>