From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH 0/8] Suspend block api (version 6) Date: Mon, 17 May 2010 14:27:52 -0700 Message-ID: <87ljbi1anb.fsf@deeprootsystems.com> References: <1272667021-21312-1-git-send-email-arve@android.com> <87wrvl5479.fsf@deeprootsystems.com> <20100503215028.GB18910@srcf.ucam.org> <20100514203202.GA12409@srcf.ucam.org> <87aas2azc5.fsf@deeprootsystems.com> <20100514231510.GG16989@thunk.org> <87r5laa4oc.fsf@deeprootsystems.com> <20100517193440.GA32066@srcf.ucam.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100517193440.GA32066@srcf.ucam.org> (Matthew Garrett's message of "Mon\, 17 May 2010 20\:34\:40 +0100") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Matthew Garrett Cc: Greg Kroah-Hartman , Jesse Barnes , Oleg Nesterov , linux-pm@lists.linux-foundation.org, Liam Girdwood , Len Brown , Jacob Pan , linux-omap@vger.kernel.org, Linus Walleij , Daniel Walker , tytso@mit.edu, Geoff Smith , Brian Swetland , Mark Brown , linux-kernel@vger.kernel.org, Tejun Heo , Andrew Morton , Wu Fengguang , Arjan van de Ven List-Id: linux-pm@vger.kernel.org Matthew Garrett writes: > On Mon, May 17, 2010 at 09:27:47PM +0200, Vitaly Wool wrote: > >> Exactly. The point is, opportunistic suspend doesn't in fact add any >> value compared to dynamic PM + CPUIdle. It only produces some false >> impression that one can handle power management right without using >> dynamic PM. And this false impression is the cause for many really >> ugly designs (like, for instance, 15 minutes touchscreen inactivity >> delay before forcibly shutting down the wireless, as it's done in >> stock Android framework). > > Run this (or equivalent code) on an N900 and on an Android. Measure the > screen-off power draw on both. > > int main() { > int i; > while (1) > i++; > return 0; > } This kind of rogue app will also kill my CPU performance. For rogue CPU-hog apps, we use _tools_ to find and fix this kind of problem: top, renice, kill, etc. that use features of the scheduler to find and/or solve the problem. For rogue apps that affect PM, what is being proposed is to bypass the root causes (timers, scheduler, activity, etc.) and just freeze the apps. Rogue CPU-hog apps are generally not tolerated. The problems are found using tools and fixed (or removed.) Why should we do any different for rogue power-hog apps? Maybe the tools aren't as good for finding power-sucking apps. Then we should be focusing on the _tools_ instead of masking the problem. Kevin