|| ||Linus Torvalds <torvalds-AT-linux-foundation.org> |
|| ||Ingo Molnar <mingo-AT-elte.hu> |
|| ||Re: suspend blockers & Android integration |
|| ||Thu, 3 Jun 2010 16:37:02 -0700 (PDT)|
|| ||tytso-AT-mit.edu, Brian Swetland <swetland-AT-google.com>,
Neil Brown <neilb-AT-suse.de>, Arve Hj?nnev?g <arve-AT-android.com>,
Thomas Gleixner <tglx-AT-linutronix.de>,
"Rafael J. Wysocki" <rjw-AT-sisk.pl>,
Alan Stern <stern-AT-rowland.harvard.edu>,
Felipe Balbi <felipe.balbi-AT-nokia.com>,
Peter Zijlstra <peterz-AT-infradead.org>,
Florian Mickler <florian-AT-mickler.org>,
Linux OMAP Mailing List <linux-omap-AT-vger.kernel.org>,
Linux PM <linux-pm-AT-lists.linux-foundation.org>,
Alan Cox <alan-AT-lxorguk.ukuu.org.uk>,
James Bottomley <James.Bottomley-AT-suse.de>,
Peter Zijlstra <a.p.zijlstra-AT-chello.nl>,
Kevin Hilman <khilman-AT-deeprootsystems.com>,
"H. Peter Anvin" <hpa-AT-zytor.com>,
Arjan van de Ven <arjan-AT-infradead.org>|
|| ||Article, Thread
On Fri, 4 Jun 2010, Ingo Molnar wrote:
> This allows a task to 'exclude' other tasks that dont have low-latency
> requirements. Crappy apps would have a large latency value, so they'd
> be idled out when a privileged task sets the exclusion level low enough.
Quite frankly, this sounds fundamentally broken.
Think deadlock. The high-latency task got a lock, and now you're excluding
it because it scheduled away.
So from my perspective, putting that kind of logic deep in the system
sounds like the _last_ thing we want to do.
I think it's much saner to have a very targeted suspend blocker that only
blocks the opportunistic suspends and has _zero_ interaction with the rest
of the system (certainly none at all with core code like the scheduler).
And if somebody then suspends the traditional way (by an actual suspend
event, not that opportunistic thing), then the suspend blocker does
nothing at all - because it simply doesn't even _exist_ at that level.
It's only about the opportunistic suspends.
(I'd further suggest that disk wait and running in kernel mode disable any
opportunistic suspend anyway - but that's not about suspend blockers as
much as it is about just the opportunistic suspend itself).
to post comments)