From patchwork Fri Oct 19 16:30:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1619051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id D7D81DF2AB for ; Fri, 19 Oct 2012 16:38:44 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TPFYu-0003xG-HI; Fri, 19 Oct 2012 16:36:40 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TPFYr-0003x2-6c for linux-arm-kernel@lists.infradead.org; Fri, 19 Oct 2012 16:36:37 +0000 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9JGa0Ln020178; Fri, 19 Oct 2012 11:36:00 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9JGa0Aj013180; Fri, 19 Oct 2012 11:36:00 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 19 Oct 2012 11:36:00 -0500 Received: from localhost (h68-9.vpn.ti.com [172.24.68.9]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9JGZxQ7023408; Fri, 19 Oct 2012 11:35:59 -0500 Date: Fri, 19 Oct 2012 19:30:27 +0300 From: Felipe Balbi To: Peter Zijlstra Subject: Re: RT throttling and suspend/resume (was Re: [PATCH] i2c: omap: revert "i2c: omap: switch to threaded IRQ support") Message-ID: <20121019163027.GD1493@arwen.pp.htv.fi> References: <20121016133356.GG21801@arwen.pp.htv.fi> <87ipaanljt.fsf_-_@deeprootsystems.com> <20121017140002.GI11394@arwen.pp.htv.fi> <20121017143534.GJ11394@arwen.pp.htv.fi> <87txtsitpt.fsf@deeprootsystems.com> <20121018055136.GF11137@arwen.pp.htv.fi> <1350655227.2768.11.camel@twins> MIME-Version: 1.0 In-Reply-To: <1350655227.2768.11.camel@twins> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.3 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.41 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Paul Walmsley , Kevin Hilman , Wolfram Sang , balbi@ti.com, Shubhrajyoti Datta , linux-i2c@vger.kernel.org, Ben Dooks , Russell King , Thomas Gleixner , linux-omap@vger.kernel.org, Shubhrajyoti D , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: balbi@ti.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, On Fri, Oct 19, 2012 at 04:00:27PM +0200, Peter Zijlstra wrote: > On Thu, 2012-10-18 at 08:51 +0300, Felipe Balbi wrote: > > > So the primary question remains: is RT runtime supposed to include the > > > time spent suspended? I suspect not. > > > > you might be right there, though we need Thomas or Peter to answer :-s > > re, sorry both tglx and I have been traveling, he still is, I'm trying > to play catch-up :-) > > Anyway, yeah I'm somewhat surprised the clock is 'running' when the > machine isn't. From what I could gather, this is !x86 hardware, right? > > x86 explicitly makes sure our clocks are 'stopped' during suspend, see > commit cd7240c0b900eb6d690ccee088a6c9b46dae815a. > > Can you do something similar for ARM? A quick look at > arch/arm/kernel/sched_clock.c shows there's already suspend/resume > hooks, do they do the wrong thing? if I understand correctly, then below should be enough. I did't test it though: Russell, would you have any comments here ? Should we make sure all ARMs call setup_sched_clock_needs_suspend() and 'stop' counting during suspend ? I will test the above diff tomorrow, unless you have any other (better) idea on how to deal with the problem. cheers diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 87ba8dd..c9260e6 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c @@ -116,7 +116,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase) return ret; } - setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); + setup_sched_clock_needs_suspend(omap_32k_read_sched_clock, 32, 32768); register_persistent_clock(NULL, omap_read_persistent_clock); pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n");