public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: DervishD <lkml@dervishd.net>
To: "Jörn Engel" <joern@logfs.org>
Cc: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ext2 on flash memory
Date: Thu, 14 Jun 2007 22:17:14 +0200	[thread overview]
Message-ID: <20070614201714.GC1928@DervishD> (raw)
In-Reply-To: <20070614174509.GB31984@lazybastard.org>

    Hi Jörn :)

 * Jörn Engel <joern@logfs.org> dixit:
> So let us look at the problems and how they interact with filesystems.
> 
> 1. Write overhead
> 
> If a filesystem only writes a small amount of data, typically 512 or
> 4096 bytes, smartmedia has to erase and write a full block.  Most
> flashes used in embedded systems has block sizes of 128KiB or so.  Most
> flashes used for smartmedia have 16KiB.  Writing 16KiB when the
> filesystem only requests writing 4KiB increases the wear 4x and reduces
> performance 4x.

    But this is not easily addressable by ext2... or FAT. Even if you
use 16KiB blocks in ext2, sometimes you will be writing only 512 bytes.
And FAT will be even worse, I imagine, when using 512-byte blocks. Won't
buffer cache (under Linux) alleviate this problem?

> 2. Wear leveling
> 
> Wear leveling happens implicitly by picking a different physical block
> from the spares on each write.  However, some blocks are never used.  If
> a physical block is mapped to a logical block that never gets written,
> it is out of the rotation.  Two seperate 1024-block areas have their
> internal wear leveling each, but nothing is spreading high wear from one
> area to another.

    I thought that wear leveling wasn't local to a group of blocks. This
means that you can destroy a flash memory by writing to the same
positions... which is a very common usage pattern.

> 4. FAT requirement
> 
> When I claimed there was nothing more to smartmedia, I was actually
> lying.  Smartmedia has the odd requirement that only FAT is supported as
> a filesystem.  In fact, the specifications describe FAT in great detail.

    Right, but I've seen many people using their pendrives with ext2
with no problems (e.g. for SLAX). So, what do you mean by "supported"?
If a filesystem can be used with the memory, do you mean that wear
leveling and other characteristics of the flash memory are tailored for
FAT? or do you mean you cannot use reliably (read: you will lose data)
other filesystems?

> a) Do wear leveling!
> 
> Smartmedia wear leveling is limited to within areas.  Any cross-device
> wear leveling must be done by the filesystem.  FAT does that fairly
> well.  The Ext family doesn't.

    Cross-device wear leveling? I don't understand, sorry O:)

    Thanks for your explanation, it has been very educational :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

  parent reply	other threads:[~2007-06-14 20:17 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 10:13 ext2 on flash memory DervishD
2007-06-11 11:11 ` Eduard-Gabriel Munteanu
2007-06-11 11:57   ` USB remote control missing keycodes Islam Amer
2007-06-11 15:02     ` Jiri Kosina
2007-06-13 14:08       ` Islam Amer
2007-06-13 14:58         ` Jiri Kosina
2007-06-13 15:17           ` Dmitry Torokhov
2007-06-13 15:44             ` Jiri Kosina
2007-06-13 15:58               ` Islam Amer
2007-06-13 16:17                 ` Jiri Kosina
2007-06-14 12:19                   ` Islam Amer
2007-06-14 12:30                     ` Jiri Kosina
2007-06-15 10:15                       ` Jiri Kosina
2007-06-15 10:51                         ` Jiri Kosina
2007-06-17 10:57                           ` Islam Amer
2007-06-18 11:42                             ` Jiri Kosina
2007-06-15 17:55     ` Phillip Susi
2007-06-11 17:36   ` ext2 on flash memory DervishD
2007-06-13 13:16     ` Ph. Marek
2007-06-13 23:02       ` DervishD
2007-06-14  5:16         ` Ph. Marek
2007-06-11 14:58 ` alan
2007-06-11 17:42   ` DervishD
2007-06-11 19:27     ` Juergen Beisert
2007-06-13 13:48       ` DervishD
2007-06-14 19:36         ` Jan Knutar
2007-06-14 20:07           ` DervishD
2007-06-11 23:53 ` Kevin K
2007-06-12  0:35   ` Kevin Bowling
2007-06-12  1:18     ` Bernd Eckenfels
2007-06-13 13:44       ` DervishD
2007-06-12  7:53     ` Juergen Beisert
2007-06-12 13:29       ` Eduard-Gabriel Munteanu
2007-06-12 16:46       ` Eduard-Gabriel Munteanu
2007-06-13 13:43   ` DervishD
2007-06-12 21:09 ` Jason Lunz
2007-06-13  6:49   ` Juergen Beisert
2007-06-14 17:45 ` Jörn Engel
2007-06-14 18:22   ` Jörn Engel
2007-06-14 20:20     ` DervishD
2007-06-14 20:43       ` Jörn Engel
2007-06-15 16:20         ` DervishD
2007-06-15 16:27           ` Jörn Engel
2007-06-14 20:17   ` DervishD [this message]
2007-06-14 20:38     ` Jörn Engel
2007-06-15 16:16       ` DervishD
2007-06-15 16:36         ` Jörn Engel
  -- strict thread matches above, loose matches on Subject: below --
2007-06-11 11:53 Tomasz Chmielewski
2007-06-12  0:17 ` Arnd Bergmann
2007-06-14 16:38 ` Jörn Engel
2007-06-14 17:19   ` Tomasz Chmielewski
2007-06-14 17:46     ` Jörn Engel
2007-06-14 22:46       ` DervishD
2007-06-15 12:08         ` Jörn Engel
2007-06-15 16:22           ` DervishD
2007-06-15 16:22             ` Jörn Engel
2007-06-18 11:31               ` DervishD
2007-06-14 21:40 Tomasz Chmielewski

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=20070614201714.GC1928@DervishD \
    --to=lkml@dervishd.net \
    --cc=joern@logfs.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