From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: David Buckley <dbuckley@oreilly.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: problem with discard granularity in sd
Date: Tue, 04 Apr 2017 20:12:20 -0400 [thread overview]
Message-ID: <yq1d1crvhjv.fsf@oracle.com> (raw)
In-Reply-To: <CA+Xd3XHp381w87Fr5_HGU5gBpWMSRSwD+pRacGkHu7Rp7CYUfg@mail.gmail.com> (David Buckley's message of "Fri, 31 Mar 2017 09:52:38 -0700")
David Buckley <dbuckley@oreilly.com> writes:
David,
> They result in discard granularity being forced to logical block size
> if the disk reports LBPRZ is enabled (which the netapp luns do).
Block zeroing and unmapping are currently sharing some plumbing and that
has lead to some compromises. In this case a bias towards ensuring data
integrity for zeroing at the expense of not aligning unmap requests.
Christoph has worked on separating those two functions. His code is
currently under review.
> I'm not sure of the implications of either the netapp changes, though
> reporting 4k logical blocks seems potential as this is supported in
> newer OS at least.
Yes, but it may break legacy applications that assume a 512-byte logical
block size.
> The sd change potentially would at least partially undo the patches
> referenced above. But it would seem that (assuming an aligned
> filesystem with 4k blocks and minimum_io_size=4096) there is no
> possibility of a partial block discard or advantage to sending the
> discard requests in 512 blocks?
The unmap granularity inside a device is often much, much bigger than
4K. So aligning to that probably won't make a difference. And it's
imperative to filesystems that zeroing works at logical block size
granularity.
The expected behavior for a device is that it unmaps whichever full
unmap granularity chunks are described by a received request. And then
explicitly zeroes any partial chunks at the head and tail. So I am
surprised you see no reclamation whatsoever.
With the impending zero/unmap separation things might fare better. But
I'd still like to understand the behavior you observe. Please provide
the output of:
sg_vpd -p lbpv /dev/sdN
sg_vpd -p bl /dev/sdN
for one of the LUNs and I'll take a look.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2017-04-05 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 16:52 problem with discard granularity in sd David Buckley
2017-04-05 0:12 ` Martin K. Petersen [this message]
2017-04-05 16:14 ` David Buckley
2017-04-06 17:34 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2017-04-11 18:07 David Buckley
2017-04-12 1:55 ` Martin K. Petersen
2017-04-12 23:58 ` David Buckley
2017-04-14 2:44 ` Martin K. Petersen
2017-04-14 20:07 ` David Buckley
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=yq1d1crvhjv.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=dbuckley@oreilly.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.