From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96108C433DF for ; Thu, 25 Jun 2020 14:37:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D1CB2076E for ; Thu, 25 Jun 2020 14:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405402AbgFYOh6 (ORCPT ); Thu, 25 Jun 2020 10:37:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:38156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405340AbgFYOh5 (ORCPT ); Thu, 25 Jun 2020 10:37:57 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65F83206B7; Thu, 25 Jun 2020 14:37:55 +0000 (UTC) Date: Thu, 25 Jun 2020 10:37:53 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: linux-kernel , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Yordan Karadzhov , Tzvetomir Stoyanov , Tom Zanussi , Jason Behmer , Julia Lawall , Clark Williams , bristot , Daniel Wagner , Darren Hart , Jonathan Corbet , "Suresh E. Warrier" Subject: Re: [RFC][PATCH] ring-buffer: Have nested events still record running time stamp Message-ID: <20200625103753.4ac4a9a2@oasis.local.home> In-Reply-To: <126813531.12266.1593093195147.JavaMail.zimbra@efficios.com> References: <20200625094454.732790f7@oasis.local.home> <126813531.12266.1593093195147.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jun 2020 09:53:15 -0400 (EDT) Mathieu Desnoyers wrote: > ----- On Jun 25, 2020, at 9:44 AM, rostedt rostedt@goodmis.org wrote: > > > From: "Steven Rostedt (VMware)" > > > > [ SEVEN YEAR PROBLEM SOLVED! ] > > > > Up until now, if an event is interrupted while it is recorded by an > > interrupt, and that interrupt records events, the time of those events will > > all be the same. This is because events only record the delta of the time > > since the previous event (or beginning of a page), and to handle updating > > the time keeping for that of nested events is extremely racy. After years of > > thinking about this and several failed attempts, I finally have a solution > > to solve this puzzle. > > Out of curiosity, considering that LTTng has solved this problem 10+ years ago > with a simpler concurrency-friendly time-stamping model, why not simply use it > rather than add complexity to the current ftrace timestamp scheme ? Because it requires updating all the tools that read this from user space. I found a solution that works, so why change it and cause the backward compatibility pain now? -- Steve