Re: Power Management with rootfs on SDMMC.

From: Pavel Machek
Date: Sat Jan 03 2009 - 15:41:47 EST


On Sat 2009-01-03 12:23:39, Linus Torvalds wrote:
>
>
> On Fri, 2 Jan 2009, Pavel Machek wrote:
> >
> > > (or, slightly reworded: I think it's high time for some kernel God to buy a measly
> > > netbook or some such instead of 16-core mainframes to get a feeling for the
> > > amount of issues that one hits there)
> >
> > I have one and yes, its full of problems; see my blog post about 'evil
> > little cards'.
>
> Btw, why do people think that CONFIG_USB_PERSIST got removed, and is now
> always on? Exactly because of this issue, and because one kernel God (me)
> wanted to be able to suspend their netbook.
>
> That said, right now most flash performance is so incredibly bad that I
> can't reasonably be expected to use that thing for anything real. They may
> say 15-20 MB/s, but that's best-case streaming performance. Real life
> write performance is often in the tens of kB (yes, *kilo* bytes) per
> second. I hope it will improve, and no, it's not just about ext3 journal
> behavior, although that certainly makes some of the issues much much
> worse.
>
> So no, I don't use my netbook very much. But this _is_ largely fixed ont
> he USB side, even if you may need to do
>
> echo 1 >/sys/bus/usb/devices/.../power/persist
>
> and I argued that we should default to it for any mounted device. It's
> hard to do, since the device doesn't even know about whether it's mounted
> or not.

Unfortunately, that corrupts filesystems by default on devices like
olympus c-750 digital camera:

* when USB is powered, olympus unmounts its filesystem, and goes into
mass storage mode.

* when USB is unpowered, olympus mounts it back.

So you have mounted filesystem on linux side and suspend. That powers
down the usb and camera mounts the filesystem automagically... then
linux resumes, and state of in-memory caches does not match real
filesystem state...

[Now, olympus uses VFAT and probably will not write to the filesystem
unless you take a picture... with mp3 player, I'd expect mtime to be
updated on the playlist files...]
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/