From: Arnd Bergmann <arnd@arndb.de>
To: 정효진 <syr.jeong@samsung.com>
Cc: 'Hugh Dickins' <hughd@google.com>,
cpgs@samsung.com, linaro-kernel@lists.linaro.org,
'Rik van Riel' <riel@redhat.com>,
linux-mmc@vger.kernel.org,
'Alex Lemberg' <alex.lemberg@sandisk.com>,
linux-kernel@vger.kernel.org,
"'Luca Porzio (lporzio)'" <lporzio@micron.com>,
linux-mm@kvack.org, kernel-team@android.com,
'Yejin Moon' <yejin.moon@samsung.com>
Subject: Re: swap on eMMC and other flash
Date: Mon, 9 Apr 2012 12:50:44 +0000 [thread overview]
Message-ID: <201204091250.45034.arnd@arndb.de> (raw)
In-Reply-To: <02cc01cd12c1$769421e0$63bc65a0$%jeong@samsung.com>
On Thursday 05 April 2012, A?E?Ao 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, 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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-04-09 12:51 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 17:44 Arnd Bergmann
2012-03-30 18:50 ` Arnd Bergmann
2012-03-30 22:08 ` Zach Pfeffer
2012-03-31 9:24 ` Arnd Bergmann
2012-04-03 18:17 ` Zach Pfeffer
2012-03-31 20:29 ` Hugh Dickins
2012-04-02 11:45 ` Arnd Bergmann
2012-04-02 14:41 ` Hugh Dickins
2012-04-02 14:55 ` Arnd Bergmann
2012-04-05 0:17 ` 정효진
2012-04-09 12:50 ` Arnd Bergmann [this message]
2012-04-08 13:50 ` Alex Lemberg
2012-04-09 2:14 ` Minchan Kim
2012-04-09 7:37 ` 정효진
2012-04-09 8:11 ` Minchan Kim
2012-04-09 13:00 ` Arnd Bergmann
2012-04-10 1:10 ` Minchan Kim
2012-04-10 8:40 ` Arnd Bergmann
2012-04-12 8:32 ` Luca Porzio (lporzio)
2012-04-09 12:54 ` Arnd Bergmann
2012-04-02 12:52 ` Luca Porzio (lporzio)
2012-04-02 14:58 ` Hugh Dickins
2012-04-02 16:51 ` Rik van Riel
2012-04-04 12:21 ` Adrian Hunter
2012-04-04 12:47 ` Arnd Bergmann
2012-04-11 10:28 ` Adrian Hunter
2012-07-16 13:29 ` Pavel Machek
2012-04-06 7:15 ` Minchan Kim
2012-04-06 16:16 ` Arnd Bergmann
2012-04-09 2:06 ` Minchan Kim
2012-04-09 12:35 ` Arnd Bergmann
2012-04-10 0:57 ` Minchan Kim
2012-04-10 8:32 ` Arnd Bergmann
2012-04-11 9:54 ` Minchan Kim
2012-04-11 15:57 ` Arnd Bergmann
2012-04-12 2:36 ` Minchan Kim
2012-04-16 18:22 ` Stephan Uphoff
2012-04-16 18:59 ` Arnd Bergmann
2012-04-16 21:12 ` Stephan Uphoff
2012-04-17 2:18 ` Minchan Kim
2012-04-17 2:05 ` Minchan Kim
2012-04-27 7:34 ` Luca Porzio (lporzio)
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=201204091250.45034.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alex.lemberg@sandisk.com \
--cc=cpgs@samsung.com \
--cc=hughd@google.com \
--cc=kernel-team@android.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-mmc@vger.kernel.org \
--cc=lporzio@micron.com \
--cc=riel@redhat.com \
--cc=syr.jeong@samsung.com \
--cc=yejin.moon@samsung.com \
/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