suspend/resume PM criterion for application

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed Sep 10 15:25:00 EDT 2014


On Wed, 10 Sep 2014 21:58:48 +0300, Ran Shalit said:

> 1. How can I make a process to notice this inactivity ? Do you think
> it can be implemented by some periodic process who check if there is
> activity ? It returns to the original question I raised, that I will
> use some periodic process who checks maybe cpu load or something like
> that. What do you think ?

That's going to depend on your system and what processes are running.

You may have an MP3 player going that doesn't take much CPU at all - but
shutting down because the user hasn't hit a button in 47 minutes will probably
irritate the user no end.  Or there may be a screensaver running that takes
twice as much CPU as the MP3 player, but is totally OK on the system
suspending whenever the rest of the system wants it.

You're going to have to look at your system design, and decide for yourself
what the criteria are.


> 2. What Do you mean here by process ?  Do you mean SW process which
> register for suspend notification (how do we do this) ? What about
> devices which register for suspend/resume. Must they accept the
> suspend ?

I believe Android already has libraries and monitor processes for this.

It's really hard to give more specific advice without knowing what your
hardware, software, and usage is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140910/eb7c4cad/attachment.bin 


More information about the Kernelnewbies mailing list