Received: by 10.192.165.148 with SMTP id m20csp893745imm; Fri, 27 Apr 2018 09:10:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpVvpgwG8k5yz+a7yKnan8yLsQM7ZydccU3h3V6ox2vmHGWka7LgN+ERnNHfZ5+UJZpB7d/ X-Received: by 2002:a65:5244:: with SMTP id q4-v6mr2595275pgp.201.1524845403342; Fri, 27 Apr 2018 09:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524845403; cv=none; d=google.com; s=arc-20160816; b=QnYl5aMSmsnmjUN66c338sV0GeaqbG4/nSJDsk6n0WAAPK0U54JHBmbn/B1ATPMe1a IkWtARPS/GmqcYhAD6VHkBjSndXBlj2VuVcwDzkecEoMqAA6X0AJ3Rp6TvvVGp6RBrgS qt/0joUQPYrZPDUHYYZN984rH+A38qmvtql6xmV3Ns4g994AOxhJH168pIAOwqjFFmyv JxLyCN0ZN2agAW325jDwp3s/rTZYfNLPveIfQUJ9DtGD6SD0nZ+rxsHa5qpqf1iacz99 5lhn9m9/t1ExcvPYJmc5wss+a2NC3A2EDxng9vfOuqAjBHlikheEOC8DP8nwz0mKJjxH u19g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=fsF/KyXqcLbEcmS1zfKCB9EUj2sRft642mcDBFMksX0=; b=ucAjQ2ZEp/KTs4KzN6cA6dtNMUXvoQBYHc1hdrxSXaDmoBYBWYP/oYAVGYT8XrDwGb heCe8FbC40xtLkT2VXuet5hm7wmTH62+f0vzthVNN5nfoO+dQ/hGPosIFIqFyPXQxEuO QQ28m5w+U/Ry5vly+HhZIryG3IV9zsTg75p0sJNfrXYsR7nWmv0TSJDUvTiwjNAB+tjs JsDJeCCDM9p/56NP8oPh+FOjNpXcvYsG8A4lT8jcgm8EDHC8i8ZS0YYjZjOj7hU6JOCS g7D/fgJACz6utNamSzOrn0+Brx+7KGR2TAsfDuasyVk9FBAFanz+YoqblD1iAmvE3sGJ DOkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4-v6si1432521pgo.305.2018.04.27.09.09.49; Fri, 27 Apr 2018 09:10:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758755AbeD0QID (ORCPT + 99 others); Fri, 27 Apr 2018 12:08:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:51240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758578AbeD0QH6 (ORCPT ); Fri, 27 Apr 2018 12:07:58 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 8BAE82188D; Fri, 27 Apr 2018 16:07:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BAE82188D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 27 Apr 2018 12:07:54 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Joel Fernandes , linux-kernel , Peter Zijlstra , Ingo Molnar , Tom Zanussi , Namhyung Kim , Thomas Gleixner , Boqun Feng , "Paul E. McKenney" , fweisbec , Randy Dunlap , Masami Hiramatsu , kbuild test robot , baohong liu , vedang patel , kernel-team Subject: Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on Message-ID: <20180427120754.42203144@gandalf.local.home> In-Reply-To: <362165882.5842.1524843735295.JavaMail.zimbra@efficios.com> References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> <362165882.5842.1524843735295.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.16.0 (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 Fri, 27 Apr 2018 11:42:15 -0400 (EDT) Mathieu Desnoyers wrote: > ----- On Apr 27, 2018, at 10:47 AM, rostedt rostedt@goodmis.org wrote: > > > On Fri, 27 Apr 2018 10:26:29 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> The general approach and the implementation look fine, except for > >> one small detail: I would be tempted to explicitly disable preemption > >> around the call to the tracepoint callback for the rcuidle variant, > >> unless we plan to audit every tracer right away to remove any assumption > >> that preemption is disabled in the callback implementation. > > > > I'm thinking that we do that audit. There shouldn't be many instances > > of it. I like the idea that a tracepoint callback gets called with > > preemption enabled. > > I see that ftrace explicitly disables preemption in its ring buffer > code. FWIW, this is redundant when called from sched-rcu tracepoints > and from kprobes which adds unnecessary performance overhead. Sure, but that code is called from other locations that do not have preemption disabled. Calling preempt_disable() is far from the biggest overhead of that code path. > > LTTng expects preemption to be disabled when invoked. I can adapt on my > side as needed, but would prefer not to have redundant preemption disabling > for probes hooking on sched-rcu tracepoints (which is the common case). Why not? Really, preempt_disable is simply a per cpu counter, with only need of adding compiler barriers. > > Do perf callbacks expect preemption to be disabled ? I'll have to look, but wouldn't be hard to change. -- Steve