User: Password:
|
|
Subscribe / Log in / New account

Suspend blocker suspense

Suspend blocker suspense

Posted May 27, 2010 17:56 UTC (Thu) by talisein (subscriber, #31829)
Parent article: Suspend blocker suspense

It seems to me for opportunistic suspend to fit into the larger Linux ecosystem, "blocking suspend" should not be an opt-in activity but rather an opt-out.

By default, applications expect to run. If they are feeling nice, they should be able to declare to the kernel "There is some work I'd like to do, but its okay if you ignore me if you think its a good time to suspend."

Then we don't have paranoid people adding blockers all over the kernel and device tree; instead people will look for places where it is explicitly okay to unblock suspend. Meanwhile Android can implement the opt-in in their base classes, while Wakelocks become inverted. This also has the benefit of publishing an interface that desktop distros can leave enabled, and GNOME/KDE/everyone else can slowly identify the non-critical sections of their code.


(Log in to post comments)

Suspend blocker suspense

Posted May 29, 2010 21:44 UTC (Sat) by jrn (subscriber, #64214) [Link]

> By default, applications expect to run. If they are feeling nice, they should be able to declare to the kernel "There is some work I'd like to do, but its okay if you ignore me if you think its a good time to suspend."

The parent can take a suspend block and provide an interface for its children to request to relinquish it. Consider the result: what happens in the window after each child is spawned and before it makes that request? If a shell script spawns friendly processes in its inner loop, is that going to block suspend?

Extending the block-by-default behavior to drivers would make it even worse. Every driver would need to include code to stop blocking suspend or the author would receive angry complaints that it killed the ability to suspend.

If I understand correctly, suspend blockers affect both opportunistic suspend and deliberate requests by the user to suspend.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds