power management

Gopi P.M. tags07 at gmail.com
Thu Mar 29 22:55:22 EDT 2007


I was browsing thru the kernel source, noticed a couple of things...
In the past i have seen the following cause delay in suspend and result in
other odd behaviours:

kernel/power/main.c:
  70<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l70>pm_prepare_console();
 71<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l71>
 72<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l72>if
(freeze_processes()) {
 73<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l73>error
= -EAGAIN;
 74<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l74>goto
Thaw;
 75<http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=a064dfd8877a471db0abbe13fc2017c7f6d39dd7;hb=bd7c99a84b86079040842651f5415f2f7c18b6e3;f=kernel/power/main.c#l75>}


I could never figure the usefulness of the above two functions in a diskless
embedded system environment. On the contrary, it has resulted in problems
such as:
a. delaying suspend... esp pm_prepare_console in trying to switch to a
virtual console during suspend.
b. freeze_processes is tricky too... it sets the PF_FREEZE bit for a process
and schedules the process thinking that the active process will notice that
bit and clean up stuff and prepare for suspend..
All is well untill you have a process that is set to uninterruptible sleep
or those process that are waiting on a semaphore... unless all these process
handle signals that bring them out of wait.. odd things could result.
c. i have seen my framebuffers get corrupted with zeros

The solution, I have just commented these out along with counterparts to
restore console upon wakeup.. lot of these make sense on disk based system
not sure if we need these on OLPC

I havnt setup my build environment yet, but hope to try this as soon as I
get to it.. I was wondering if anyone else has experienced the same? Any
thoughts?


Gopi




On 3/29/07, Hal Murray <hmurray at megapathdsl.net> wrote:
>
> >> I just ran across this link:
> >> http://wiki.laptop.org/go/Hardware_Power_Domains
>
> > If it is hard to find, where would you suggest we add links to it?
>
> I'd expect a Power Panagement page with lots of info.  This is an
> important
> area.  Right?
> There is one at
>   http://wiki.laptop.org/go/Power_Management
> but it's a bit thin and says "work in process".
>
> So the real question is how to find that Power Managment page.
>
> There is a link to the Hardware page on the left side of the main Wiki
> page, but once you get there you have to read the specs area to find the
> Power Management line.
>
> So my vote would be to extend the links at the top of the hardware page so
> Power Management is easier to find.
>
> An alternative would be a system overview page to collect the ideas that
> cross the hardware/software line.  (with links to the appropriate hardware
> and software sections)
>
>
>
>
>
> --
> These are my opinions, not necessarily my employer's.  I hate spam.
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at laptop.org
> http://mailman.laptop.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070329/b5d9cc1d/attachment.html>


More information about the Devel mailing list