On Thu, May 27, 2010 at 4:50 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
This is a much harder question to answer that what we need to use
opportunistic suspend. The question we ask is more like this: "Is all
important work complete?". In the simplest case these can be the same,
but on Android they are not. Some wakeup events require work to be
performed in many processes. A thread that needs to respond to a
wakeup event may currently be busy doing unimportant work. This could
possibly be solved by saying all important work must be above priority
N, but you would need full priority inheritance support and we are not
there today.
What happens if the user presses the button right before you set QoS
of 'user apps' to QS_NONE?
To me it looks like this solution would result in this sequence which
may ignore the button press:
Button pushed
Button driver sets QoS of app it wakes to QS_ABOVESUSPEND
Set QoS of 'user apps' to QS_NONE
Why is "wake_up_pri(&queue, priority)" more acceptable than "suspend_block(..."?
What happens if the button press happend before this line:
I don't think it works. Also, it does not seem much less invasive than
suspend blockers.
--
Arve Hjønnevåg
--