[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090813152636.GB13559@linux.intel.com>
Date: Thu, 13 Aug 2009 08:26:36 -0700
From: Matthew Wilcox <willy@...ux.intel.com>
To: david@...g.hm
Cc: Hugh Dickins <hugh.dickins@...cali.co.uk>,
Nitin Gupta <ngupta@...are.org>, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-scsi@...r.kernel.org, linux-ide@...r.kernel.org
Subject: Re: Discard support (was Re: [PATCH] swap: send callback when swap
slot is freed)
On Thu, Aug 13, 2009 at 08:17:34AM -0700, david@...g.hm wrote:
> On Thu, 13 Aug 2009, Matthew Wilcox wrote:
>
>> So TRIM isn't free, and there's a better way for the drive to find
>> out that the contents of a block no longer matter -- write some new
>> data to it. So if we just swapped a page in, and we're going to swap
>> something else back out again soon, just write it to the same location
>> instead of to a fresh location. You've saved a command, and you've
>> saved the drive some work, plus you've allowed other users to continue
>> accessing the drive in the meantime.
>
> on the other hand, if you then end up swapping the page you read in out
> again and haven't dirtied it, you now have to actually write it as
> opposed to just throwing it away (knowing that you already have a copy of
> it stored on the swap device)
This is true, but at the point where you call discard, you will also
have to write it again. My point was about delaying calls to discard,
rather than moving the point, or changing the circumstances under which
one calls discard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists