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, 26 Apr 2011 23:58:18 +0100 [thread overview]
Message-ID: <20110426225818.GD5832@shareable.org> (raw)
In-Reply-To: <BANLkTi=Zn+kDfErZN6tm6yxHTt4v6o7XNw@mail.gmail.com>
Andrei Warkentin wrote:
> Hi Per,
>
> On Tue, Apr 26, 2011 at 5:33 AM, Per Forlin <per.forlin@linaro.org> wrote:
> > On 23 April 2011 11:23, Linus Walleij <linus.walleij@linaro.org> wrote:
> >> 2011/4/22 Pavel Machek <pavel@ucw.cz>:
> >>
> >>> Plus, I was told new MMC standard has "write reliable" option...
> >>
> >> I think Per F?rlin looked into reliable write. The latest eMMC cards
> >> has this, but OTOMH it was too darn slow to be used on current
> >> chips/"cards".
> >>
> >> Per, Sebastian: any details?
> > I had plans to add reliable writes and do benchmarking but I never got
> > to it. Right now I have no plans to pick it up.
> >
> >>
>
> Reliable writes are in mmc-next already. As an improvement to that
> path, I have a CMD23-bounded request support patch set which is
> pending.
>
> Reliable writes are exposed via REQ_FUA.
Are you sure that's appropriate?
Unless I have misunderstood (very possible), REQ_FUA means writes hit
non-volatile storage before acknowledgement, not that they are atomic.
I think the normal users of REQ_FUA don't require or expect large
atomic writes; they use it as a shortcut for (write & flush this
write) without implying anything else is flushed.
> Keep in mind that flash cards don't have a volatile cache, so once an
> MMC transaction goes through the data is in flash.
Does that not mean MMC already provides REQ_FUA semantics on every
transactions?
I don't know much about MMC, but the problems reported with other
flash devices are either volatile cache (so may not apply to
conformant MMCs), or random corruption of data that was supposed to be
stored long ago, even data quite far from the locations being written
at the time, because the flash is presumably reorganising itself.
There are even reports of data loss resulting from power removal while
reading.
> All reliable writes guarantee is flash state if an MMC transaction
> is interrupted in the middle. Additionally, the "new" reliable write
> (as opposed to legacy) is even less useful, since it only provides
> that guarantee at a sector boundary.
Perhaps the sector bondary limitation makes it faster and/or limits
the amount of buffer required, and/or allows the device to accept
larger write transactions. Which is good if it means reliability
doesn't get switched off or faked. Or perhaps it's just to align, a
little, with perceived behaviour of hard disks.
Hard disks don't guarantee large atomic writes as far as I know, so
filesystems & databases generally don't assume it, and it's not really
a problem. Some people say you can rely on a single 512-byte sector
being atomically updated or not on a hard disk, but some don't; I'm
siding with the latter. (SQLite has a storage flag you can set if you
know the storage has that property, to tweak its commit strategy.)
-- Jamie
next prev parent reply other threads:[~2011-04-26 22:58 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 [this message]
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
-- 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=20110426225818.GD5832@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).