Re: Re : Re : Re : [HELP] Power management for embedded system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 25, 2006 at 01:39:25PM +0000, moreau francis wrote:
> Russell King wrote:
> > We have some folk who want a method to trigger emergency suspends when
> > batteries got low, or if you move the battery cover, etc.  These are
> > events which require fast reactions from the system, and coding up some
> > additional interface to pass such events to userland, have some daemon
> > running to monitor for those events, and issue a PM event is completely
> > overkill and, actually, unreliable.
> > 
> 
> I'm not sure to understand why a daemon is needed. Could you explain ?

Consider how you would make a connection between an interrupt being
triggered and a suspend occuring, bearing in mind that you require
a process context to perform a suspend.

You essentially have three options:

1. a kernel thread, to which you pass an event or trigger condition.
2. a userland daemon which waits for the interrupt via some special
   kernel interface and triggers a suspend via normal userspace
   channels.
3. some hotplug-triggered userspace method.

Note that both 2 and 3 have the same limitation - since they use normal
userspace channels which have no concept of "emergency suspend", it's
quite possible for (eg) a busy X server to inappropriately delay such a
suspend.

Therefore, I chose (1) as being the most appropriate solution.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux