All of lore.kernel.org
 help / color / mirror / Atom feed
From: pwaechtler@mac.com (Peter Waechtler)
To: linux-arm-kernel@lists.infradead.org
Subject: MMC and reliable write - was: since when does ARM map the	kernel memory in sections?
Date: Mon, 6 Jun 2011 22:38:26 +0200	[thread overview]
Message-ID: <201106062238.26713.pwaechtler@mac.com> (raw)
In-Reply-To: <20110606102855.GA5820@atrey.karlin.mff.cuni.cz>

Am Montag, 6. Juni 2011, 12:28:55 schrieb Pavel Machek:
> Hi!
> 
> > > So basically add a new REQ_ flag - something like REQ_SAFE, which
> > > would ensure that data
> > > on block storage is not corrupted due to interrupting this write (or
> > > even, after the write, if the card does some optimizations). We
> > > already have a flag that ensures corruptions don't occur
> > > because of local-to-disk caches - REQ_FUA, so this would just thinking
> > > about what effects REQ_FUA  already has that's not considered. On a
> > > (spinning) disk, I can't image that interrupting a REQ_FUA write would
> > > cause data loss somewhere other than where data was written.
> > > 
> > > Then it would be as simple as a mount flag that would ensure all
> > > (write) accesses are FUA accesses, to ensure desired behavior for
> > > platforms where power could be cut at any moment.
> > 
> > I think you're mixing up different concepts.
> > 
> > On a spinning hard disk, _all_ writes don't cause data loss other than
> > where data is written, rounded up to the sector (512 or 4096 bytes).
> 
> ...
> 
> Yes, so on mmc there are two different problems:
> 
> * reliability of write itself (REL_WRITE solves that)
> 
> * reliability of data around write (there are for bits "controlling"
>   it in 4.4.1 MMC specs, unfortunately they are only writable by card
>   manufacturer AFAICS).
> 									Pavel

Yes - and there is another issue (but you could say that it fits to 2):

background operations

After programming a page the "pairing" page should be corrected.
Then there is garbage collection and wear leveling. If this is 
interrupted/disturbed by a sudden power loss "at the wrong moment": user data 
gets possibly corrupted.

The power supply has to give you a signal that power will be lost, say, in 30 
ms. Now a mechanism has to be specified how to tell the device to stop any 
programming in a timely fashion - the HPI (high prio interrupt) comes to mind.

	Peter

  reply	other threads:[~2011-06-06 20:38 UTC|newest]

Thread overview: 38+ 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 [this message]
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
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

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=201106062238.26713.pwaechtler@mac.com \
    --to=pwaechtler@mac.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.