From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754850AbcITOW3 (ORCPT ); Tue, 20 Sep 2016 10:22:29 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59580 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753586AbcITOW0 (ORCPT ); Tue, 20 Sep 2016 10:22:26 -0400 Date: Tue, 20 Sep 2016 16:19:56 +0200 (CEST) From: Thomas Gleixner To: Binoy Jayan cc: "Steven Rostedt (Red Hat)" , Ingo Molnar , Daniel Wagner , Arnd Bergmann , linux-kernel@vger.kernel.org, Masami , Mark Brown , Carsten Emde Subject: Re: [RFC PATCH v7 4/5] tracing: Measure delayed hrtimer offset latency In-Reply-To: <1474379517-7705-5-git-send-email-binoy.jayan@linaro.org> Message-ID: References: <1474379517-7705-1-git-send-email-binoy.jayan@linaro.org> <1474379517-7705-5-git-send-email-binoy.jayan@linaro.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Sep 2016, Binoy Jayan wrote: > +#ifdef CONFIG_TRACE_DELAYED_TIMER_OFFSETS > +static inline void latency_hrtimer_timing_start(struct hrtimer *timer, > + struct hrtimer_clock_base *new_base, > + ktime_t tim) > +{ > + ktime_t now = new_base->get_time(); > + > + if (ktime_to_ns(tim) < ktime_to_ns(now)) > + timer->tim_expiry = now; > + else > + timer->tim_expiry = ktime_set(0, 0); You still fail to explain why this get_time() magic is required. This is executed unconditionally when the config switch is enabled and does not depend on whether the trace functionality is enabled or not. So you are imposing the extra get_time() call, which can be expensive depending on the underlying hardware, on every hrtimer start invocation. Tracing is supposed to have ZERO impact when it is not used and even when it's in use then the impact should be kept as low as possible. The above does none of that. Neither did you provide a proper rationale for this infrastructure in the changelog. You can repost that over and over and it will not go anywhere if you don't start to address the review comments I give you. Thanks, tglx