Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756749Ab0FCXnS (ORCPT ); Thu, 3 Jun 2010 19:43:18 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35581 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756438Ab0FCXnQ (ORCPT ); Thu, 3 Jun 2010 19:43:16 -0400 Date: Thu, 3 Jun 2010 16:37:02 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar 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 Subject: Re: suspend blockers & Android integration In-Reply-To: <20100603232302.GA16184@elte.hu> Message-ID: References: <20100603193045.GA7188@elte.hu> <20100603231153.GA11302@elte.hu> <20100603232302.GA16184@elte.hu> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 35 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). Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/