From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: "Elliott, Robert (Persistent Memory)" <elliott@hpe.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"util-linux@vger.kernel.org" <util-linux@vger.kernel.org>,
"Kani, Toshimitsu" <toshi.kani@hpe.com>,
"Knippers, Linda" <linda.knippers@hpe.com>
Subject: Re: mkfs.btrfs cannot find rotational file for SSD detection for a pmem device
Date: Wed, 9 Sep 2015 07:28:14 -0400 [thread overview]
Message-ID: <55F017CE.1090505@gmail.com> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B40295BD1EB13@G4W3202.americas.hpqcorp.net>
[-- Attachment #1: Type: text/plain, Size: 3428 bytes --]
On 2015-09-08 16:00, Elliott, Robert (Persistent Memory) wrote:
>
>> -----Original Message-----
>> From: Austin S Hemmelgarn [mailto:ahferroin7@gmail.com]
>> Sent: Tuesday, September 8, 2015 7:56 AM
>> Subject: Re: mkfs.btrfs cannot find rotational file for SSD detection for
>> a pmem device
>>
>> On 2015-09-06 13:51, Elliott, Robert (Persistent Memory) wrote:
> ...
>>> The impact looks limited to the print and causing it to not
>>> automatically disable "metadata duplication on a single device."
>> This is an issue inherent in the current pmem driver however, it should
>> be fixed there and not in mkfs.btrfs, as other filesystems make
>> decisions based on this file also, as does the I/O scheduler, and some
>> block storage servers.
>> ...
>
> The rotational file does exist, at:
> /sys/devices/LNXSYSTM\:00/LNXSYBUS\:00/ACPI0012\:00/ndbus1/region0/namespace0.0/block/pmem0/queue/rotational
>
> One or more functions are having trouble parsing that 108-byte string
> ... mkfs.btrfs's is_ssd, libblkid's blkid_devno_to_wholedisk, or
> libblkid's sysfs_devno_to_wholedisk. I'm not sure where the
> breakdown occurs.
Ah, sorry about the confusion, I didn't think to actually look before
commenting. So, it looks like this amounts to some short-sighted
coding, although I could see why they wouldn't have accounted for the
possibility of having to parse some monstrous path like that, and that
also would explain why kernel side stuff isn't choking on it. Now, the
real question is why we have to go through the full absolute path in
sysfs, and can't just go through /sys/block/pmem0.
>
> This is reminiscent of an issue that numactl has parsing the path to
> get to .../device/numa_node (rather than .../queue/rotational). It
> was confused by not finding "/devices/pci" in a path for a storage
> device.
>
>> This gets tricky though because pmem isn't
>> technically a block device at the low level, and doesn't use some parts
>> of the block layer that most other block devices do.
>>
>> On that note however, if the pmem device is backed by actual RAM and not
>> flash storage (and most of them are from what I've seen), then the only
>> advantage of using single metadata mode over dup is space savings, as
>> RAM is not (usually) write limited.
>
> pmem devices will be a mix ranging from flash-backed DRAM to new
> technologies like 3D Crosspoint, usually offering high performance
> and good wearout characteristics.
Hmm, I've never actually seen flash-backed DRAM based NV-DIMM's,
although I've not necessarily been keeping up to date. Most of what
I've seen have been small (512M or 1G) ferro-electric RAM based ones,
and an early design that was battery backed (which is just a crisis
waiting to happen).
>
> The btrfs driver does detect it as SSD after mkfs.btrfs did not:
> kernel: BTRFS info (device pmem0): disk space caching is enabled
> kernel: BTRFS: has skinny extents
> kernel: BTRFS: flagging fs with big metadata feature
> kernel: BTRFS: detected SSD devices, enabling SSD mode
>
That makes sense if it's an issue in userspace with parsing of the path,
although depending on the actual underlying storage for the pmem device,
this may actually make things slower (the particular effect of SSD mode
is that it tries to spread allocations out as much as possible, as this
helps with wear-leveling on many SSD's).
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
next prev parent reply other threads:[~2015-09-09 11:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 17:51 mkfs.btrfs cannot find rotational file for SSD detection for a pmem device Elliott, Robert (Persistent Memory)
2015-09-08 12:56 ` Austin S Hemmelgarn
2015-09-08 20:00 ` Elliott, Robert (Persistent Memory)
2015-09-09 11:28 ` Austin S Hemmelgarn [this message]
2015-09-09 12:12 ` Boaz Harrosh
2015-09-09 12:40 ` Austin S Hemmelgarn
2015-09-09 13:07 ` Boaz Harrosh
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=55F017CE.1090505@gmail.com \
--to=ahferroin7@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=elliott@hpe.com \
--cc=linda.knippers@hpe.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=toshi.kani@hpe.com \
--cc=util-linux@vger.kernel.org \
/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