On Sun, Aug 01, 2010 at 10:06:34PM -0700, david@lang.hm wrote:
Why not flesh this out and compare it to the draft requirements?
(I expect to be sending another version by end of day Pacific Time.)
The biggest issue I see right off-hand is that a straightforward
implementation of your idea would require moving processes from one
cgroup to another when acquiring or releasing a suspend blocker, which
from what I understand would be way to heavyweight. On the other hand,
if acquiring and releasing a suspend blocker does not move the process
from one cgroup to another, then you need something very like the
suspend-blocker mechanism to handle those processes that are permitted
to acquire suspend blockers, and which are thus not a member of the
cgroup in question.
That said, I did see some hint from the Android guys that it -might-
be possible to leverage cgroups in the way that you suggest might help
save power during times when suspend was blocked but (for example) the
screen was turned off. The idea would be to freeze the cgroup whenever
the screen blanked, even if suspend was blocked. The biggest issue
here is that any process that can hold a suspend blocker must never to
an unconditional wait on any process in this cgroup. Seems to me that
this should be possible in theory, but the devil would be in the details.
If I am misunderstanding your proposal, please enlighten me!
Thanx, Paul
--