LWN: Comments on "Suspend blocker suspense"
http://lwn.net/Articles/389407/
This is a special feed containing comments posted
to the individual LWN article titled "Suspend blocker suspense".
hourly2Suspend blocker suspense
http://lwn.net/Articles/390647/rss
2010-06-02T20:10:36+00:00hingo
touche!
:-)
Suspend blocker suspense
http://lwn.net/Articles/389929/rss
2010-05-29T21:44:47+00:00jrn
<div class="FormattedComment">
<font class="QuotedText">> 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."</font><br>
<p>
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?<br>
<p>
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.<br>
<p>
If I understand correctly, suspend blockers affect both opportunistic suspend and deliberate requests by the user to suspend.<br>
</div>
Suspend blocker suspense
http://lwn.net/Articles/389779/rss
2010-05-28T06:11:47+00:00k8to
<div class="FormattedComment">
Ah, but you were expecting that.<br>
</div>
Suspend blocker suspense
http://lwn.net/Articles/389651/rss
2010-05-27T17:56:27+00:00talisein
<div class="FormattedComment">
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. <br>
<p>
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."<br>
<p>
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.<br>
</div>
Suspend blocker suspense
http://lwn.net/Articles/389561/rss
2010-05-27T10:18:57+00:00njd27
<blockquote><i>As of this writing, Linus has not said what he intends to do.</i></blockquote>
<p>I fully expect some kind of left-field solution that complete solves the problem in a way no-one was expecting...</p>
Suspend blocker suspense
http://lwn.net/Articles/389546/rss
2010-05-27T08:57:45+00:00dlang
<div class="FormattedComment">
as far as I can tell this is explicitly disagreeing with your #3 requirement.<br>
<p>
They are saying that many apps are badly written and so do things when they don't need to. So as a result, unless the app raises the suspend block, the system may decide to go to sleep, even if the app is busy doing things.<br>
</div>
Suspend blocker suspense
http://lwn.net/Articles/389536/rss
2010-05-27T08:46:45+00:00neilbrown
<div class="FormattedComment">
There seem to be a few different issues here that get conflated and so<br>
confuse the picture. I think I can pick out three things.<br>
<p>
The context is, of course, that we want to get to a low power state as<br>
quickly as possible, but lower power states tend to have larger<br>
latencies for resuming operation and that can sometimes be a problem.<br>
<p>
So the three issues are:<br>
<p>
1/ Some application may "know" that it needs low latency. i.e. it is<br>
busy doing something useful for the device owner and shouldn't be<br>
forced into an unduly low power state. Thus it will want to "block<br>
suspend".<br>
<p>
2/ An event may arrive (incoming call, button press, etc) at the<br>
kernel level, and the kernel needs to ensure that this event gets<br>
adequately responded to before we drop into a low power state.<br>
e.g. for an incoming call, the kernel needs to keep the phone from<br>
suspending until the gui has had a chance to notice the call and so<br>
request it's own suspend-block.<br>
<p>
3/ Maybe we shouldn't be suspending anyway. If any process is active,<br>
then it should be able to run. Hardware should (and supposedly new<br>
hardware does) use as little power if a non-suspend deep sleep as it<br>
does in full suspend so there should be no need for suspend.<br>
I'm not sure I have that argument exactly right. Maybe suspend is OK<br>
if we "know" that any important interrupt will wake from suspend, and<br>
that we "know" how long to the next timer event and can program a<br>
wakeup for that time.<br>
<p>
The "suspend blocker" proposal seems to conflate the first two and<br>
adds the assumption that the required minimum latency that an app can<br>
ask for is either all or nothing. It ignores the third, or maybe<br>
explicitly disagrees with it, saying that processes have no right to<br>
expect to keep running unless they explicitly ask for (and pay for)<br>
that right.<br>
<p>
On top of that there are subtleties about how an app might express its<br>
latency requirements, whether it might be just another ulimit or<br>
whether something else might be needed.<br>
<p>
So on the whole I'm not surprised that the discussion isn't getting<br>
anywhere as you can always find one part of the big complex issue that<br>
a particular proposal doesn't address, and attack it on that basis.<br>
<p>
I think it is important to clearly define the problem first (didn't<br>
Einstein say that?) and in this case I think we have several problems<br>
that need to be separated - quite probably more than just these three.<br>
<p>
<p>
</div>