On Thu, May 27, 2010 at 10:23:50PM +0200, Thomas Gleixner wrote:
The problem is that, right now, if a wakeup event is received between
the point where userspace decides to start a suspend and userspace
actually starts a suspend, that event may not abort the suspend.
Not at all. Depending on what it reads, it may follow some other path
where it sleeps. But, as I keep saying, if you don't want to support
that kind of code then all of this is massively easier.
No, but if that while (1) is draw_cows() then the user may want this to
run while their session is active and stop running while their session
is idle. So you only want it to be QoS(NONE) in the idle session case.
How do you change that state?
The tested case was a stock Android install with opportunistic suspend
enabled and one that just used runtime idle. The lowest power state
entered was the same on both.
You need suspend blockers to avoid losing wakeups in the explicit
suspend case even if you don't want to implement opportunistic suspend.
--
Matthew Garrett | mjg59@srcf.ucam.org
--