linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: m@bjorling.me (Matias Bjørling)
Subject: [PATCH 5/6] lightnvm: expose device geometry through sysfs
Date: Fri, 1 Jul 2016 09:20:57 +0200	[thread overview]
Message-ID: <577619D9.1080209@bjorling.me> (raw)
In-Reply-To: <1467316875.21253.24.camel@linux.intel.com>

On 06/30/2016 10:01 PM, J Freyensee wrote:
> On Wed, 2016-06-29@16:51 +0200, Matias Bj?rling wrote:
>> From: "Simon A. F. Lund" <slund at cnexlabs.com>
>>
>> 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.
>

You are right. These are rightfully placed under /lightnvm in the sysfs 
path. The description is wrong, will update it. Thanks Jay.

> 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
>

  reply	other threads:[~2016-07-01  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:51 [PATCH 0/6] enable sysfs for lightnvm Matias Bjørling
2016-06-29 14:51 ` [PATCH 1/6] nvme: refactor namespaces to support non-gendisk devices Matias Bjørling
2016-06-29 14:51 ` [PATCH 2/6] null_blk: refactor " Matias Bjørling
2016-06-29 14:51 ` [PATCH 3/6] blk-mq: register device instead of disk Matias Bjørling
2016-06-29 14:51 ` [PATCH 4/6] lightnvm: let drivers control the lifetime of nvm_dev Matias Bjørling
2016-06-29 14:51 ` [PATCH 5/6] lightnvm: expose device geometry through sysfs Matias Bjørling
2016-06-30 20:01   ` J Freyensee
2016-07-01  7:20     ` Matias Bjørling [this message]
2016-06-29 14:51 ` [PATCH 6/6] lightnvm: expose gennvm target type " Matias Bjørling
  -- strict thread matches above, loose matches on Subject: below --
2016-06-10 12:22 [PATCH 5/6] lightnvm: expose device geometry " Matias Bjørling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577619D9.1080209@bjorling.me \
    --to=m@bjorling.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).