[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: Arm linux software suspend
From:       Nils Faerber <nils.faerber () kernelconcepts ! de>
Date:       2005-08-08 15:09:51
Message-ID: 42F775BF.8030505 () kernelconcepts ! de
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Schulz schrieb:
> Hi Abhijit,
Hi!

> I have a similar issue, on a PXA255. I would like
> to suspend to NAND flash. The reason?

That will be interesting ;)

> The device is to be part of a machine, and
> as well as the restore-from-disk (hopefully) being 
> faster that a cold-start, all settings and
> configurations will be (trivially) maintained
> between 'sessions.

Oh...

> (There is also going to be a power fail detect to
> trigger the suspend-to-disk.)
> So, I'm keen to hear how you get on. 

Well, I doubt that this is the right approach for you then. Suspending
to disk is really meant for harddisks not Flash. Flash has some very bad
caveats for this purpose.
One of them is the quite limited number of write cycles. If you use the
same flash partition for suspending you will be destroying the Flash
chips quite easily (try to look on Google for destroyed flashes by using
ext2 filesystems on them - it happens quite easily).
Especially NAND is superbly ugly and would require a lot of extra code
to provide the needed liniear storage. I don't know if MTD can provide
this, I doubt, because the NAND error handling is usually done with MTD
+ filesystem (like JFFS2).
And last this will not save you any time for bootup since reading from
and writing to Flash is not really that fast, especially NAND *can* be
quite slow. So especially the power fail approach will probably not work
at all.
And last but not least judging from my notebook the only real advantage
of resuming from disk is that you will get back almost to the state you
left the machine. Almost means that many drivers have to reinitialised
and thus many things get reset in the process, like most hotplug
interface (USB, Firewire, PCMCIA/Cardbus, etc.).

> Paul
Cheers
  nils


> On 8/6/05, Abhijit Bhopatkar <bainonline@gmail.com> wrote:
> 
>>On 8/5/05, Nicolas Pitre <nico@cam.org> wrote:
>>
>>>On Fri, 5 Aug 2005, Geoff Levand wrote:
>>>
>>>
>>>>Holger Schurig wrote:
>>>>
>>>>>>I am trying to figure out a powersaving scheme for an embedded 
>>
>>device. And
>>
>>>>>>was wondering if we can do a complete hibernate on arm-linux.
>>>>>
>>>>>
>>>>># echo mem >/sys/power/state
>>>>>
>>>>>works quite nice here (Kernel 2.6.13-rc2, Intel PXA255).
>>>>>
>>>>
>>>>That will get you suspend to ram. He wants suspend to disk (echo disk
>>>>
>>>>>/sys/power/state).
>>>
>>>You are sure that's what he wants?
>>
>>:-)
>>Well he is right
>>I want suspend to disk, so that i can completely shutdown the board.
>>Of course i will have to replace the actual disk with something else
>>like perhaps a usb partition (may be too slow but it doesn't matter).
>>Or i will have to write a new back end, but before i dive into
>>exploring that, i just wanted to know if suspend to disk is possible
>>on arm?
>>
>>I am using a custom board with PXA255, and a wifi card attached to
>>pcmcia, (i don't need wifi to be preserved so i can always unload the
>>modules before hibernating.) Yes i have external means of turning the
>>board off and on again.
>>The problem i am tackling is that, the main application running takes
>>a long time to initialise, something like 10 mins. on each reboot.
>>That makes it shutting it down in the middle, almost impossible. I can
>>do with 1-2 mins of boot time though, i guess that's more than enough
>>to wake up from hibernation for a system with 32 MB ram.
>>The device is not needed to be up all the time and is kept up only due
>>to init latency.
>>(don not ask me why it takes 10 mins. i am already frowning at the app
>>developers)
>>
>>Thanks and regards,
>>Abhijit Bhopatkar
>>

- --
kernel concepts          Tel: +49-271-771091-12
Dreisbachstr. 24         Fax: +49-271-771091-19
D-57250 Netphen          Mob: +49-176-21024535
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC93W/JXeIURG1qHgRAgzeAKDt0A3q8uDkq769a67XSEpF0yqrBgCg4osC
thqNzTt6bzhyzRYrKDSKf4M=
=Qsup
-----END PGP SIGNATURE-----

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic