linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jamie@shareable.org (Jamie Lokier)
To: linux-arm-kernel@lists.infradead.org
Subject: since when does ARM map the kernel memory in sections?
Date: Tue, 19 Apr 2011 01:43:01 +0100	[thread overview]
Message-ID: <20110419004301.GS16019@shareable.org> (raw)
In-Reply-To: <07919bf9-f05f-ca1c-c084-c4ee18a9dc58@me.com>

Peter Waechtler wrote:
> Hmh,
> 
> I'm not 100% sure, but a lot of people made good experience with JFFS2.
> 
> Is it that hard to get a log structured file system power fail safe?
> Either the end or "commit" block was written or not?

Yes, it's very hard, maybe impossible, on the types of flash media
being discussed,

For a useful filesystem, it's not enough to know that a single
"commit" block is written or not.  The hard part is when the media
writes things out of order, so at the next mount, even though you
confirm the last "commit" is valid, any earlier blocks might not be
valid.  The only way to be sure of the last coherent state that you
still have, is to read everything, and even then a valid filesystem
where random files have acquired holes they didn't have before is not
very useful.

A purely log structured filesystem should at least look like a valid
filesystem after power failure and reboot, but:

- I am not sure that JFFS2 is purely log structured any more, with the
  compact summary information in each block about what's written
  elsewhere in the block.  That's not reliable on media where you
  can't guarantee anything about the order of writes.  If the summary
  information were ignored, it would be reliable, but slower to read.

- A valid filesystem, and valid files on it are a bit different.
  fsync needs to work for applications to have some sanity in what
  they can depend on.  JFFS2 is fine with that on NOR/NAND directly,
  but if the media doesn't guarantee order of writes...

- Write disturb effects, where writing something corrupts data stored
  elsewhere, in other blocks that the filesystem thought was stable.

- On some media, blocks far apart are less likely to disturb each
  other (for example some RAIDs), but not on flash translation media
  where the physical layout and logical layout may be completely
  different.

- Read disturb effects, where reading triggers flash reorganisation
  too, and then you pull the power while the flash is writing
  internally to reorganise, and on the next boot something's gone
  missing that was stable before.

All the problems are avoidable on devices designed to avoid them.
Problem is devices aren't sold on the basis of these
characteristics, and it's not something the next layer up can
workaround reliably, though it might be able to be more robust.

-- Jamie

  parent reply	other threads:[~2011-04-19  0:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 18:52 since when does ARM map the kernel memory in sections? Peter Wächtler
2011-04-12 19:11 ` Colin Cross
2011-04-13 18:19   ` Peter Wächtler
2011-04-12 19:20 ` Andrei Warkentin
2011-04-12 20:33   ` Jamie Lokier
2011-04-13 15:27     ` Nicolas Pitre
2011-04-13 20:11       ` Jamie Lokier
2011-04-18 13:52     ` Pavel Machek
2011-04-18 17:07       ` Jamie Lokier
2011-04-18 17:17         ` Nicolas Pitre
2011-04-22 15:47         ` Pavel Machek
2011-04-23  9:23           ` Linus Walleij
2011-04-26 10:33             ` Per Forlin
2011-04-26 19:00               ` Peter Waechtler
2011-04-26 19:07                 ` Jamie Lokier
2011-04-26 20:38                   ` MMC and reliable write - was: " Peter Waechtler
2011-04-26 22:45                     ` Jamie Lokier
2011-04-27  1:13                       ` Andrei Warkentin
2011-04-27 13:07                         ` Jamie Lokier
2011-04-27 19:18                           ` Andrei Warkentin
2011-04-27 19:33                             ` Arnd Bergmann
2011-05-03  8:04                             ` Jamie Lokier
2011-06-06 10:28                               ` Pavel Machek
2011-06-06 20:38                                 ` Peter Waechtler
2011-04-26 20:24               ` Andrei Warkentin
2011-04-26 22:58                 ` Jamie Lokier
2011-04-27  0:27                   ` Andrei Warkentin
2011-04-27 13:19                     ` Jamie Lokier
2011-04-27 13:32                       ` Arnd Bergmann
2011-04-27 18:50                         ` Peter Waechtler
2011-04-27 18:58                           ` Andrei Warkentin
2011-04-18 19:21       ` Peter Waechtler
2011-04-18 17:24         ` Pavel Machek
2011-04-19  0:43         ` Jamie Lokier [this message]
2011-04-13  6:51   ` Peter Wächtler
2011-04-13 15:44     ` Nicolas Pitre
2011-04-13 18:35       ` Peter Wächtler
2011-04-12 20:15 ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2011-04-28 20:26 Peter Waechtler
2011-04-28 21:38 ` Andrei Warkentin

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=20110419004301.GS16019@shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).