linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Batched discard support
@ 2010-09-29  8:54 Lukas Czerner
  2010-09-29  8:54 ` [PATCH] Add ioctl FITRIM Lukas Czerner
  2010-09-30  0:55 ` [PATCH 0/1] Batched discard support Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Lukas Czerner @ 2010-09-29  8:54 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: tytso, sandeen, adilger, lczerner

Hi,

I am working on something I have called "batched discard support" for Ext3
and Ext4 filesystems. Traditional discard support for filesystems like Ext4
has been implemented the way that whenever the file is unlinked the
disk-space that the file was using is trimmed (discarded) by
sb_issue_discard() to let the device know that this portion of disk is no
longer in use by the filesystem and can be safely used for wear-leveling.

However, this approach comes with very noticeable performance loss on most
of SSD devices and LUN's I have the opportunity to test it on. The fact is,
that bigger discard ranges are more efficient than smaller ones, so it make
sense try to batch the ranges together wherever it is possible.

I have introduced new filesystem independent ioctl (FITRIM) which can be used
to send the "trim this portion of filesystem" command down to the filesystem
which (if implemented) discards all free extents in that range.

The implementation for Ext3 and Ext4 is complete and you can see it here:

http://www.spinics.net/lists/linux-ext4/msg21050.html

Why I am sending it here to linux-fsdevel is because I am introducing new fs
independent ioctl and new member of super_operations (trim_fs) and we would
like let you know about this approach (which any filesystem can take
advantage from) and we would like your comment on this patch before we
send it upstream.

Thanks!
-Lukas

[PATCH] 9c8c3a5 Add ioctl FITRIM

 fs/ioctl.c         |   39 +++++++++++++++++++++++++++++++++++++++
 include/linux/fs.h |    8 ++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-30 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29  8:54 [PATCH 0/1] Batched discard support Lukas Czerner
2010-09-29  8:54 ` [PATCH] Add ioctl FITRIM Lukas Czerner
2010-09-30  0:55 ` [PATCH 0/1] Batched discard support Dave Chinner
2010-09-30 12:17   ` Lukas Czerner
2010-09-30 16:11   ` Eric Sandeen

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).