From: James Bottomley <James.Bottomley@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-scsi@vger.kernel.org, axboe@kernel.dk, matthew@wil.cx
Subject: Re: [PATCH 1/2] block: add support for discard limits
Date: Mon, 02 Nov 2009 09:39:36 -0600 [thread overview]
Message-ID: <1257176376.2472.24.camel@mulgrave.site> (raw)
In-Reply-To: <yq1eioh9hsr.fsf@sermon.lab.mkp.net>
On Mon, 2009-11-02 at 08:29 -0500, Martin K. Petersen wrote:
> >>>>> "Christoph" == Christoph Hellwig <hch@infradead.org> writes:
>
> >> ACS-2 doesn't currently have a notion of unmap granularity and all
> >> array vendors I have talked to appear to happily process any unmap
> >> request we throw at them. So I'm leaning towards keeping things
> >> simple and just sending things down verbatim...
>
> Christoph> We have all the granularity and alignment information
> Christoph> avilable and keeping track of it is simple enough.
>
> That's not the issue.
>
> Nothing prevents you from submitting a misaligned read/write request to
> the array. If you do, the array may be slower in servicing the request.
> But the entire request will still be serviced.
>
> Similarly, nothing prevents you from submitting a misaligned unmap
> request. If you do, the array will just ignore the portions that do not
> constitute entire allocation units. Your code is taking what is a hint
> and turning it into a hard limit. Note that it's called OPTIMAL UNMAP
> GRANULARITY, not REQUIRED UNMAP GRANULARITY.
>
> Every vendor I have talked to have asked us to always unmap the *entire*
> LBA range we're interested in freeing. No exceptions.
>
> We don't throw away the beginning/end of a read/write request because
> it's not properly aligned either, do we?
Agree entirely for this with UNMAP, since the array will just silently
discard what it doesn't want.
Don't necessarily agree with this for WRITE_SAME. From the
implementations I've read, it sounds like the array will discard all
sectors within the correct boundary and alignment but it will have to
write zeros to all sectors outside of the aligned region ... this sounds
like a performance hit unless we do some judicious aligning of the
discards.
James
next prev parent reply other threads:[~2009-11-02 15:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 15:08 [PATCH 0/2] scsi discard support Christoph Hellwig
2009-10-29 15:08 ` [PATCH 1/2] block: add support for discard limits Christoph Hellwig
2009-10-29 19:06 ` Jens Axboe
2009-10-30 5:03 ` Christoph Hellwig
2009-11-02 12:39 ` Jens Axboe
2009-10-30 3:19 ` Martin K. Petersen
2009-10-30 5:05 ` Christoph Hellwig
2009-11-02 13:29 ` Martin K. Petersen
2009-11-02 15:39 ` James Bottomley [this message]
2009-11-02 18:16 ` Martin K. Petersen
2009-11-02 16:02 ` Boaz Harrosh
2009-11-02 18:18 ` Martin K. Petersen
2009-11-03 15:16 ` Christoph Hellwig
2009-10-29 15:08 ` [PATCH 2/2] sd: add support for WRITE SAME (16) with unmap bit Christoph Hellwig
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=1257176376.2472.24.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthew@wil.cx \
/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