[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201204091250.45034.arnd@arndb.de>
Date: Mon, 9 Apr 2012 12:50:44 +0000
From: Arnd Bergmann <arnd@...db.de>
To: Á¤È¿Áø <syr.jeong@...sung.com>
Cc: "'Hugh Dickins'" <hughd@...gle.com>, cpgs@...sung.com,
linaro-kernel@...ts.linaro.org, "'Rik van Riel'" <riel@...hat.com>,
linux-mmc@...r.kernel.org,
"'Alex Lemberg'" <alex.lemberg@...disk.com>,
linux-kernel@...r.kernel.org,
"'Luca Porzio (lporzio)'" <lporzio@...ron.com>, linux-mm@...ck.org,
kernel-team@...roid.com, "'Yejin Moon'" <yejin.moon@...sung.com>
Subject: Re: swap on eMMC and other flash
On Thursday 05 April 2012, Á¤È¿Áø wrote:
> I'm not sure that how Linux manage swap area.
> If there are difference of information for invalid data between host and
> eMMC device, discard to eMMC is good for performance of IO. It is as same
> as general case of discard of user partition which is formatted with
> filesystem.
> As your e-mail mentioned, overwriting the logical address is the another
> way to send info of invalid data address just for the overwrite area,
> however it is not a best way for eMMC to manage physical NAND array. In
> this case, eMMC have to trim physical NAND array, and do write operation at
> the same time. It needs more latency.
> If host send discard with invalid data address info in advance, eMMC can
> find beat way to manage physical NAND page before host usage(write
> operation).
> I'm not sure it is the right comments of your concern.
> If you need more info, please let me know
One specific property of the linux swap code is that we write relatively
large clusters (1 MB today) sequentially and only reuse them once all
of the data in them has become invalid. Part of my suggestion was to
increase that size to the erase block size of the underlying storage,
e.g. 8MB for typical eMMC. Right now, we send a discard command
just before reusing a swap cluster, for the entire cluster.
In my interpretation, this already means a typical device will never to a
garbage collection of that erase block because we never overwrite the
erase block partially.
Luca suggested that we could send the discard command as soon as an
individual 4kb page is freed, which would let the device reuse the
physical erase block as soon as all the pages in that erase block have
been freed over time, but my interpretation is that while this can
help for global wear levelling, it does not help avoid any garbage
collection.
Arnd
--
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