From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Andreas Mohr <andi@lisas.de>
Cc: Sriram V <vshrirama@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: Power Management with rootfs on SDMMC.
Date: Fri, 2 Jan 2009 12:21:48 +0100 [thread overview]
Message-ID: <20090102122148.175cff4a@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20090102102152.GA26603@rhlx01.hs-esslingen.de>
[-- Attachment #1: Type: text/plain, Size: 2971 bytes --]
On Fri, 2 Jan 2009 11:21:52 +0100
Andreas Mohr <andi@lisas.de> wrote:
>
> There have been long threads on mobile phone and netbook related forums about issues
> with seemingly "any slightly advanced use whatsoever" of partitions on SD cards.
>
As you may notice, you only get egg on your face when you suspend, so
it's really just the single problem. Granted, it's still a big one.
> IMHO in this strongly increasingly netbook- and mobile phone-enabled world it's
> a bloody shame that:
> - we have a hanging suspend/resume on an SD rootfs (often the only way of
> achieving serious Linux use on a mobile phone!)
I take it this is without CONFIG_MMC_UNSAFE_RESUME.
The fundamental problem is that we have no way of detecting if a card
was removed during suspend, meaning we cannot guarantee that we'll
return the hardware to the upper layers in the same state it was
before the suspend.
There are two improvements that can be made here:
- Don't power down the card during suspend. This eats more power and
might not be supported on all systems, but it allows us to detect any
removal. This has been on my todo list for ages, but I haven't found
any time to implement it (or even test if I have any systems that
might support it).
- Have upper layers handle removal detection. E.g. in the common case
of rootfs, the filesystem driver verifies that the storage is in the
same state when it resumes as it was when it suspended. This requires
a lot of work though as AFAIK there is no suspend functionality in
either the block layer or the VFS.
> - we lose partition mounts due to full device re-probing instead of re-using the
> same minor device ID after resume
This is a block layer issue, and I don't know if it's fixable.
Basically the problem is that someone is keeping the resources
associated with the pre-suspend block device pinned in memory. When the
post-suspend block device is created, it cannot reuse the device IDs
since they are still in use.
> - installing a swap partition on an SD card and then resuming can easily
> go as far as __even completely corrupting__ the entire SD card partitioning
> plus first partition (corrupts first 1kB of the card: both table and partition)
> People then immediately resort to a non-helpful "Don't Do This, Ever" reply
> (using swap partition on SD and suspend, see http://dev.laptop.org/ticket/6532#comment:10),
Hmm... I was under the impression that they got this fixed nice and
proper. Perhaps comment 34 should be sent to lkml and/or added to the
kernel bugzilla.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-01-02 11:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 6:35 Power Management with rootfs on SDMMC Sriram V
2009-01-02 10:21 ` Andreas Mohr
2009-01-02 11:21 ` Pierre Ossman [this message]
2009-01-02 12:21 ` Andreas Mohr
2009-01-02 17:24 ` Pavel Machek
2009-01-03 20:23 ` Linus Torvalds
2009-01-03 20:43 ` Pavel Machek
2009-01-03 20:45 ` Alan Cox
2009-01-03 21:16 ` Linus Torvalds
2009-01-03 23:10 ` Alan Cox
2009-01-04 2:59 ` Linus Torvalds
2009-01-04 12:04 ` Alan Cox
2009-01-04 17:53 ` Linus Torvalds
2009-03-29 16:26 ` Andreas Mohr
2009-04-05 18:45 ` Pierre Ossman
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=20090102122148.175cff4a@mjolnir.drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=andi@lisas.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vshrirama@gmail.com \
/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.