From: Klaus Jensen <k.jensen@samsung.com>
To: "Harris, James R" <james.r.harris@intel.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: Incorrect NVMe DLFEAT?
Date: Thu, 29 Apr 2021 19:22:20 +0200 [thread overview]
Message-ID: <YIrrTIrbOM9ReDp5@apples.localdomain> (raw)
In-Reply-To: <F676026A-C861-410E-934F-1BBAC20CDCE2@intel.com>
On Apr 29 16:51, Harris, James R wrote:
>Hi,
>
Hi Jim,
>I’m seeing SPDK test failures with QEMU NVMe controllers that I’ve
>bisected to QEMU commit 2605257a26 (“hw/block/nvme: add the dataset
>management command”).
>
>The failing tests are related to write zeroes handling. If an NVMe
>controller supports DSM, and DLFEAT indicates that deallocated blocks
>will read back as zeroes, then SPDK uses DEALLOCATE to implement the
>write zeroes operation. (Note: SPDK prefers this method to using NVMe
>WRITE_ZEROES, since the latter is limited to a 16-bit block count.)
>
The Dataset Management command is advisory, the controller gives no
guarantee that it will actually deallocate anything. You cannot use DSM
as a realiable alternative to Write Zeroes. The QEMU emulated nvme
device exploits this and in many cases wont deallocate anything if it
does not fit nicely with the underlying block device setup.
>QEMU sets DLFEAT = 0x9 – and actually set it to 0x9 even before this
>commit. Since the lower 3 bits are 0b001, it is reporting that
>deallocated blocks will read back later as 0. This does not actually
>seem to be the case however – reading previously deallocated blocks do
>not actually return 0s.
>
Can you share the configuration you use for QEMU? DSM works best with
4096 byte LBAs (logical_block_size=4096) and the raw format driver.
Also, please test with the Error Recovery feature (and set DULBE) to
test if the device reports that the block is actually deallocated.
>It seems DLFEAT is being set incorrectly here – should probably be 0x8
>instead?
>
>Thanks,
>
>Jim
>
>
>
--
k
next prev parent reply other threads:[~2021-04-29 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210429165141eucas1p267855d81741ff7a775f1345c02703b09@eucas1p2.samsung.com>
2021-04-29 16:51 ` Incorrect NVMe DLFEAT? Harris, James R
2021-04-29 17:22 ` Klaus Jensen [this message]
2021-04-29 19:05 ` Harris, James R
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=YIrrTIrbOM9ReDp5@apples.localdomain \
--to=k.jensen@samsung.com \
--cc=james.r.harris@intel.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).