From: Matthew Wilcox <matthew@wil.cx>
To: David Woodhouse <dwmw2@infradead.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Tejun Heo <teheo@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nick Piggin <npiggin@suse.de>, Jens Axboe <jens.axboe@oracle.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>, Dongjun Shin <djshin90@gmail.com>,
chris.mason@oracle.com
Subject: Re: about TRIM/DISCARD support and barriers
Date: Mon, 24 Nov 2008 20:28:52 -0700 [thread overview]
Message-ID: <20081125032851.GC25548@parisc-linux.org> (raw)
In-Reply-To: <1227517430.26957.20.camel@macbook.infradead.org>
On Mon, Nov 24, 2008 at 09:03:50AM +0000, David Woodhouse wrote:
> And _then_ we can think about special cases which let us merge
> non-contiguous discards.
I've been thinking about what a solution would look like that lets us
send non-contiguous discards down, and I don't like the look of any of
them. Right now, discard bios get turned into discard requests and
those are handled by the block device drivers as being a discard of the
range (sector, sector + nr_sectors).
If we're going to allow discontiguous ranges to be merged into one
request, then we need somewhere to store the ranges. The obvious answer
is in the ->bio list. But then, an unconverted driver will discard the
wrong sectors (presuming nr_sectors gets updated to the length of all
discarded sectors).
There's also murmurings from vendors that they want to restrict the
number of ranges transmitted in a single UNMAP/TRIM command, and that's
more information to be passed to the elevator.
How about an interface that lets the driver's discard function scan back
through the queue and see if there are any more discard bios queued up?
If there are, (and it has room for them) it can retire them from the
queue early.
I'm open to other ideas, of course.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2008-11-25 3:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 4:46 about TRIM/DISCARD support and barriers Tejun Heo
2008-11-23 7:11 ` Tejun Heo
2008-11-23 7:57 ` Tejun Heo
2008-11-24 5:40 ` Dongjun Shin
2008-11-24 5:45 ` Tejun Heo
2008-11-24 5:57 ` James Bottomley
2008-11-23 12:35 ` Matthew Wilcox
2008-11-23 13:39 ` David Woodhouse
2008-11-23 22:52 ` James Bottomley
2008-11-24 9:03 ` David Woodhouse
2008-11-24 18:42 ` James Bottomley
2008-11-24 18:52 ` David Woodhouse
2008-11-24 18:57 ` Jens Axboe
2008-11-24 19:08 ` James Bottomley
2008-11-25 9:16 ` Jens Axboe
2008-11-24 19:09 ` James Bottomley
2008-11-25 3:28 ` Matthew Wilcox [this message]
2008-11-25 9:15 ` Jens Axboe
2008-11-24 3:01 ` Theodore Tso
2008-11-28 13:21 ` Raz Ben-Yehuda
2008-11-29 22:57 ` Tejun Heo
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=20081125032851.GC25548@parisc-linux.org \
--to=matthew@wil.cx \
--cc=James.Bottomley@HansenPartnership.com \
--cc=chris.mason@oracle.com \
--cc=djshin90@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=teheo@suse.de \
/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).