From: Arnd Bergmann <arnd@arndb.de>
To: Kyungmin Park <kmpark@infradead.org>
Cc: Lukas Czerner <lczerner@redhat.com>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v6] fat: Batched discard support for fat
Date: Wed, 30 Mar 2011 16:45:57 +0200 [thread overview]
Message-ID: <201103301645.57991.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTimA7tmaaw=8XZjaxs9qVOZMjYFCL=UnkJoKXqT=@mail.gmail.com>
On Wednesday 30 March 2011, Kyungmin Park wrote:
> >> If you just pass the minimum length, the file system could end up
> >> erasing a 4 MB section that spans two half erase blocks, or it
> >> could span a few clusters of the following erase block, both of
> >> which is not desirable from a performance point of view.
> >
> > Does those cards export such information correctly ?
>
> Each chip vendor knows it exactly and usually can't tell it outside officially.
I have written a tool for measuring the erase block size reliably
and guessing the page size.
> but it's not big as you think.
The largest erase block I have measured is 12 MB (on a USB stick),
while the smallest typical erase block that gets used in SDHC cards
is 2 MB. I have seen one card using a 1.5 MB erase block.
Older SD cards (up to 2 GB) commonly have erase blocks as small as
128 KB, but for all I know these do not get produced any more. The
smallest cards on the market today are 2 GB cards with 2 MB erase
blocks.
> also if the request size is under trim size, then it's discarded internally.
> I mean do nothing at firmware level.
I don't think that's possible with SD cards, since the command is "erase",
not "trim", i.e. the data gets inaccessible after the command returns.
On eMMC, the command is actually "trim", which can probably be discarded
as you say.
SD cards can also do pre-erase when writing. This has similar meaning
as trim, but is not currently supported by Linux, because it is not
as easy to use.
Arnd
next prev parent reply other threads:[~2011-03-30 14:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 10:34 [PATCH v6] fat: Batched discard support for fat Kyungmin Park
2011-03-29 5:04 ` OGAWA Hirofumi
2011-03-29 5:11 ` Kyungmin Park
2011-03-29 6:37 ` OGAWA Hirofumi
2011-03-29 6:42 ` Kyungmin Park
2011-03-29 7:28 ` OGAWA Hirofumi
2011-03-30 13:22 ` Arnd Bergmann
2011-03-30 13:50 ` Lukas Czerner
2011-03-30 13:58 ` Kyungmin Park
2011-03-30 14:45 ` Arnd Bergmann [this message]
2011-03-30 14:20 ` Arnd Bergmann
2011-03-30 14:44 ` Kyungmin Park
2011-03-30 15:06 ` Arnd Bergmann
2011-05-24 1:18 ` Kyungmin Park
2011-05-24 4:47 ` OGAWA Hirofumi
2011-05-24 5:21 ` Kyungmin Park
2011-05-24 6:39 ` OGAWA Hirofumi
2011-05-24 6:55 ` Kyungmin Park
2011-05-24 7:32 ` OGAWA Hirofumi
2011-05-24 8:54 ` Kyungmin Park
2011-05-24 9:44 ` OGAWA Hirofumi
2011-05-24 9:25 ` Lukas Czerner
2011-05-24 10:07 ` OGAWA Hirofumi
2011-05-24 10:44 ` Lukas Czerner
2011-05-24 11:14 ` OGAWA Hirofumi
2011-05-24 11:32 ` Lukas Czerner
2011-05-24 12:19 ` OGAWA Hirofumi
2011-05-24 13:30 ` Lukas Czerner
2011-05-24 14:19 ` OGAWA Hirofumi
2011-08-31 13:02 ` Kyungmin Park
2011-08-31 17:51 ` OGAWA Hirofumi
2011-10-05 14:38 ` Lukas Czerner
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=201103301645.57991.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=hirofumi@mail.parknet.co.jp \
--cc=kmpark@infradead.org \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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