From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752143Ab2G0Wlw (ORCPT ); Fri, 27 Jul 2012 18:41:52 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:50705 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197Ab2G0Wlv (ORCPT ); Fri, 27 Jul 2012 18:41:51 -0400 Date: Fri, 27 Jul 2012 23:41:28 +0100 From: Russell King - ARM Linux To: Linus Walleij Cc: "Bedia, Vaibhav" , Colin Cross , Nicolas Pitre , Marc Zyngier , "linux-kernel@vger.kernel.org" , John Stultz , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" , Krzysztof Halasa Subject: Re: [RFC] ARM: sched_clock: update epoch_cyc on resume Message-ID: <20120727224128.GA14835@n2100.arm.linux.org.uk> References: <1342567672-29071-1-git-send-email-ccross@android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 28, 2012 at 12:23:05AM +0200, Linus Walleij wrote: > On Tue, Jul 24, 2012 at 11:16 AM, Bedia, Vaibhav wrote: > > >> > A connecting theme is that of being avle to flag clock sources as > >> > sched_clock providers. If all clocksources were tagged with > >> > rating, and only clocksources were used for sched_clock(), the > >> > kernel could select the highest-rated clock under all circumstances. > >> > > >> > But that's quite intrusive, more of an idea. :-P > >> > > > > Too intrusive I guess ;) > > > > There were some discussions on this in the context of AM335x [1] [2]. > > Right now only sched_clock can be registered and I guess this restriction > > is not going to go away any time soon. > > Why do you think that? The restriction to only assign sched_clock() at > compile-time was recently removed so its now runtime assigned. > > So yes, a clock source that can die and change frequency is no good > as primary system time, but the abstraction could still be used for > those that do, just add another flag NOT_CONTINUOUS or so, and > make sure the system does not select this for primary system > clock source. > > Then modelling sched_clock() on clock sources makes all more > sense: just select the best one. For primary system clock source, > do not select one which is non-continous. Except for the overhead. sched_clock() is supposed to be as _fast_ as it can possibly be, because it has a direct impact on the performance of the system.