Re: [PATCH 5/6] lightnvm: expose device geometry through sysfs
From: J Freyensee
Date: Thu Jun 30 2016 - 16:01:18 EST
On Wed, 2016-06-29 at 16:51 +0200, Matias BjÃrling wrote:
> From: "Simon A. F. Lund" <slund@xxxxxxxxxxxx>
>
> For a host to access an Open-Channel SSD, it has to know its
> geometry,
> so that it writes and reads at the appropriate device bounds.
>
> Currently, the geometry information is kept within the kernel, and
> not
> exported to user-space for consumption. This patch exposes the
> configuration through sysfs and enables user-space libraries, such as
> liblightnvm, to use the sysfs implementation to get the geometry of
> an
> Open-Channel SSD.
>
> The sysfs entries are stored within the device hierarchy, and can be
> found using the "lightnvm" device type.
>
> An example configuration looks like this:
>
> /sys/class/nvme/
> âââ nvme0n1
> âââ capabilities: 3
> âââ device_mode: 1
> âââ channel_parallelism: 0
> âââ erase_max: 1000000
> âââ erase_typ: 1000000
> âââ flash_media_type: 0
> âââ media_capabilities: 0x00000001
> âââ media_type: 0
> âââ multiplane: 0x00010101
> âââ num_blocks: 1022
> âââ num_channels: 1
> âââ num_luns: 4
> âââ num_pages: 64
> âââ num_planes: 1
> âââ page_size: 4096
> âââ prog_max: 100000
> âââ prog_typ: 100000
> âââ read_max: 10000
> âââ read_typ: 10000
> âââ sector_oob_size: 0
> âââ sector_size: 4096
> âââ media_manager: gennvm
> âââ ppa_format: 0x380830082808001010102008
> âââ vendor_opcode: 0
> âââ version: 1
>
That is an awful lot of new things to add under nvme0n1-type sysfs
entries when there is already a decent amount of stuff under it.
Any chance these new things could be stuck under a separate sysfs
directory under each nvmeXnY device? If these things are mainly
beneficial to LightNVM, it will be easier for a LightNVM newbie to
find, recognize, and consider all the important things in an Open
Channel SSD solution if it's under a separate directory. And for
current SSD solutions that don't seem to need these things exposed in
sysfs for operation, it will make what is directly under nvmeXnY
directories less cluttered.
Thanks,
Jay