Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbbEYULP (ORCPT ); Mon, 25 May 2015 16:11:15 -0400 Received: from www.linutronix.de ([62.245.132.108]:49784 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750837AbbEYULN (ORCPT ); Mon, 25 May 2015 16:11:13 -0400 Date: Mon, 25 May 2015 22:11:15 +0200 (CEST) From: Thomas Gleixner To: Sylvain Rochet cc: Alexandre Belloni , Daniel Lezcano , Nicolas Ferre , Boris Brezillon , Maxime Ripard , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clockevents: don't suspend/resume if unused In-Reply-To: <20150525190641.GA7542@gradator.net> Message-ID: References: <1421399151-26800-1-git-send-email-alexandre.belloni@free-electrons.com> <20150525190641.GA7542@gradator.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1630 Lines: 41 On Mon, 25 May 2015, Sylvain Rochet wrote: > On Mon, May 25, 2015 at 08:48:06PM +0200, Thomas Gleixner wrote: > > On Fri, 16 Jan 2015, Alexandre Belloni wrote: > > > > > There is no point in calling suspend/resume for unused > > > clockevents as they are already stopped and disabled. > > > > > > Furthermore, it can take some time to wait for some IPs to stop counting. > > > > While I agree with the patch itself, I really can't understand that > > last sentence. > > > > If stuff is stopped and disabled, what takes time to stop counting? > > Atmel PIT is a bit weird, writing to AT91_PIT_MR restarts the timer even > if you just want to stop it and then the only way to stop the timer is > to wait for a complete timer cycle. > > The problem is not when suspending, restarting the timer just before > suspending is not such a problem because is will eventually stop at > some point in the future. > > However it can takes a very long time if the system switchs to slow > clock, therefore when resuming the timer is still running and we have to > wait for the PIT to stop counting because we re-enabled it for one cycle > when suspending, which is weird, it adds about ~128ms resumt time for > Atmel SoC. That's a reasonable explanation. While timer IPs seem to be designed by janitors in general, this one has an extraordinary level of stupidity. Thanks, tglx -- 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/