From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: suspend blockers & Android integration Date: Fri, 4 Jun 2010 01:46:34 +0200 Message-ID: <20100603234634.GA21831@elte.hu> References: <20100603193045.GA7188@elte.hu> <20100603231153.GA11302@elte.hu> <20100603232302.GA16184@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Torvalds Cc: tytso@mit.edu, Brian Swetland , Neil Brown , Arve Hj?nnev?g , Thomas Gleixner , "Rafael J. Wysocki" , Alan Stern , Felipe Balbi , Peter Zijlstra , LKML , Florian Mickler , Linux OMAP Mailing List , Linux PM , Alan Cox , James Bottomley , Peter Zijlstra , Kevin Hilman , "H. Peter Anvin" , Arjan van de Ven List-Id: linux-omap@vger.kernel.org * Linus Torvalds wrote: > 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. Mail was a bit too long already so i trimmed it at the wrong place :-/ What you say is absolutely true, hence this would be driven via sched_tick() + TIF notifiers - i.e. only ever treat user-mode tasks as 'idle-able'. This can be done with no overhead to the regular fastpaths. The TIF notifier would be the one scheduling to idle - and would thus do it only to user-mode tasks. Thanks, Ingo