Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932664AbbELO00 (ORCPT ); Tue, 12 May 2015 10:26:26 -0400 Received: from www.linutronix.de ([62.245.132.108]:55539 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932314AbbELO0Z (ORCPT ); Tue, 12 May 2015 10:26:25 -0400 Date: Tue, 12 May 2015 16:26:27 +0200 (CEST) From: Thomas Gleixner To: Steven Rostedt cc: Drew Richardson , Peter Zijlstra , Mathieu Desnoyers , Ingo Molnar , "linux-kernel@vger.kernel.org" , John Stultz , Wade Cherry , Pawel Moll Subject: Re: [PATCHv3] ftrace: Provide trace clock monotonic raw In-Reply-To: <20150508104120.3de866e0@gandalf.local.home> Message-ID: References: <1430750469-16428-1-git-send-email-drew.richardson@arm.com> <199091314.42407.1430752205090.JavaMail.zimbra@efficios.com> <20150504200515.GA24626@dreric01-Precision-T1650> <20150504205748.GB21418@twins.programming.kicks-ass.net> <20150505145438.GA5145@dreric01-Precision-T1650> <20150508100903.39641009@gandalf.local.home> <20150508143037.GB1276@dreric01-Precision-T1650> <20150508104120.3de866e0@gandalf.local.home> 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,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1777 Lines: 38 On Fri, 8 May 2015, Steven Rostedt wrote: > On Fri, 8 May 2015 07:30:39 -0700 > Drew Richardson wrote: > > > Expose the NMI safe accessor to the monotonic raw clock to the > > tracer. The mono clock was added with commit > > 1b3e5c0936046e7e023149ddc8946d21c2ea20eb. The advantage of the > > monotonic raw clock is that it will advance more constantly than the > > monotonic clock. > > > > Imagine someone is trying to optimize a particular program to reduce > > instructions executed for a given workload while minimizing the effect > > on runtime. Also suppose that NTP is running and potentially making > > larger adjustments to the monotonic clock. If NTP is adjusting the > > monotonic clock to advance more rapidly, the program will appear to > > use fewer instructions per second but run longer than if the monotonic > > raw clock had been used. The total number of instructions observed > > would be the same regardless of the clock source used, but how it's > > attributed to time would be affected. > > > > Conversely if NTP is adjusting the monotonic clock to advance more > > slowly, the program will appear to use more instructions per second > > but run more quickly. Of course there are many sources that can cause > > jitter in performance measurements on modern processors, but let's > > remove NTP from the list. > > > > The monotonic raw clock can also be useful for tracing early boot, > > e.g. when debugging issues with NTP. > > > > Peter, Thomas, John, you OK with this? Yup. -- 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/