From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756271AbYIYVR6 (ORCPT ); Thu, 25 Sep 2008 17:17:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752823AbYIYVRt (ORCPT ); Thu, 25 Sep 2008 17:17:49 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:40376 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbYIYVRs (ORCPT ); Thu, 25 Sep 2008 17:17:48 -0400 Date: Thu, 25 Sep 2008 23:16:54 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Steven Rostedt , Martin Bligh , Peter Zijlstra , Martin Bligh , linux-kernel@vger.kernel.org, Thomas Gleixner , Andrew Morton , prasad@linux.vnet.ibm.com, Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Tom Zanussi , Steven Rostedt Subject: Re: [RFC PATCH 1/3] Unified trace buffer Message-ID: <20080925211653.GA16403@elte.hu> References: <33307c790809250825u567d3680w682899c111e10ed6@mail.gmail.com> <20080925153635.GA12840@elte.hu> <20080925195522.GA22248@elte.hu> <20080925201211.GA1878@elte.hu> <20080925211017.GA12689@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925211017.GA12689@elte.hu> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > ftrace has the same robustness design as lockdep has: as little > external infrastructure dependencies as possible. And lockdep has > recursion checks too, and excessive amounts of paranoia all around the > place. > > Ftrace has the same robustness philosophy too, and yes, despite that > we judged cpu_clock() to be worth the risk, because accurate and fast > timestamps are a feature and we didnt want to duplicate. and note that there's another pragmatic argument: often we notice cpu_clock() bugs by looking at traces. I.e. people fixing trace timestamps _fix the scheduler_. Sometimes it is very hard to notice scheduling artifacts that happen due to small inaccuracies in cpu_clock(). so there's continuous coupling between precise scheduling and good trace timestamps. I'd be willing to pay a lot more for that than the few (rather obvious...) robustness problems we had with sched_clock() in the past. anyway ... i'm not _that_ attached to the idea, we can certainly go back to the original ftrace method of saving raw TSC timestamps and postprocessing. I think users will quickly force us back to a more dependable clock, and if not then you were right and i was wrong ;-) In fact even when we used sched_clock() there were some artifacts: as you pointed it out we dont want to do per event cross-CPU synchronization by default as that is very expensive. Some people wanted GTOD clock for tracing and we very briefly tried that - but that was an utter maintenance nightmare in practice. Ingo