From: Christoph Hellwig <hch@lst.de>
To: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Christoph Hellwig <hch@lst.de>,
Jens Axboe <jens.axboe@oracle.com>,
Matthew Wilcox <matthew@wil.cx>,
linux-mm@kvack.org, linux-scsi@vger.kernel.org
Subject: Re: unconditional discard calls in the swap code
Date: Wed, 18 Nov 2009 18:12:32 +0100 [thread overview]
Message-ID: <20091118171232.GB25541@lst.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0910301629030.4106@sister.anvils>
On Fri, Oct 30, 2009 at 05:26:18PM +0000, Hugh Dickins wrote:
> Yes, in practice TRIM seems a huge disappointment: is there a device on
> which it is really implemented, and not more trouble than it's worth?
>
> I'd been waiting for OCZ to get a Vertex 1.4* firmware out of Beta
> before looking at swap discard again; but even then, the Linux ATA
> support is still up in the air, so far as I know.
I've tied it up now for libata, and testing with the releases OCZ 1.4
firmware. Haven't tested anything else yet except for my own
implementations of TRIM and WRITE SAME in qemu which are a lot faster
than real hardware.
>
> You don't mention swap's discard of the whole partition (or all
> extents of the swapfile) at swapon time: do you believe that usage
> is okay to retain? Is it likely on some devices to take so long,
> that I ought to make it asynchronous?
The use on swapon seems fine - we've also added support to discard
on mkfs which is generally fast enough - the existing implementations
seem to have mostly constant overhead, the more blocks your discard,
the better.
> Assuming that initial swap discard is good, I wonder whether just
> to revert the discard of swap clusters for now: until such time as
> we find devices (other than mtd) that can implement it efficiently.
>
> If we do retain the discard of swap clusters, under something more
> than an #if 0, any ideas for what I should make it conditional upon?
add a sysctl / sysfs tunable for it? For all filesystems we now have
patches pending to require and -o discard option to use it, which will
be quite nessecary for 2.6.33 where all the block layer / scsi layer /
libata support will fall into place.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-11-18 17:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 6:51 Christoph Hellwig
2009-10-30 17:26 ` Hugh Dickins
2009-11-18 17:12 ` Christoph Hellwig [this message]
2009-11-30 17:22 ` [PATCH] mm: don't discard unused swap slots by default Christoph Hellwig
2009-11-30 18:28 ` Hugh Dickins
2009-11-30 18:58 ` Martin K. Petersen
2009-12-31 0:33 ` Hugh Dickins
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=20091118171232.GB25541@lst.de \
--to=hch@lst.de \
--cc=hugh.dickins@tiscali.co.uk \
--cc=jens.axboe@oracle.com \
--cc=linux-mm@kvack.org \
--cc=linux-scsi@vger.kernel.org \
--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