Re: [PATCH 08/26] cxl/mem: Expose device dynamic capacity capabilities

From: Jonathan Cameron
Date: Thu Apr 04 2024 - 04:44:39 EST


On Tue, 26 Mar 2024 11:30:38 -0700
fan <nifan.cxl@xxxxxxxxx> wrote:

> On Mon, Mar 25, 2024 at 04:40:16PM -0700, Davidlohr Bueso wrote:
> > On Sun, 24 Mar 2024, ira.weiny@xxxxxxxxx wrote:
> >
> > > +What: /sys/bus/cxl/devices/memX/dc/region_count
> > > +Date: June, 2024
> > > +KernelVersion: v6.10
> > > +Contact: linux-cxl@xxxxxxxxxxxxxxx
> > > +Description:
> > > + (RO) Number of Dynamic Capacity (DC) regions supported on the
> > > + device. May be 0 if the device does not support Dynamic
> > > + Capacity.
> >
> > If dcd is not supported then we should not have the dc/ directory
> > altogether.
> >
> > Thanks,
> > Davidlohr
>
> I also think so. However, I also noticed one thing (not DCD related).
> Even for a PMEM device, for example, we have a ram directory under the
> device directory.

True, but it's new ABI so we don't have to copy and Dan's patch to
allow for hiding static attribute directories has landed in the meantime.
So I vote for hiding it.

>
> ===================
> root@DT:~# cxl list
> [
> {
> "memdev":"mem0",
> "pmem_size":536870912,
> "serial":0,
> "host":"0000:0d:00.0"
> }
> ]
> root@DT:~# ls /sys/bus/cxl/devices/mem0/
> dc dev driver firmware firmware_version label_storage_size numa_node payload_max pmem pmem0 ram security serial subsystem trigger_poison_list uevent
> root@DT:~#
> ===================
>
> Fan
>