Received: by 10.192.165.148 with SMTP id m20csp864088imm; Fri, 27 Apr 2018 08:43:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpuLwnfd6zwnPti7UQT5sWv+nxbluaRK4pGrjTpCfkscBAzj+v8BJtbJr3yDf6aFIqvW8an X-Received: by 2002:a63:7c15:: with SMTP id x21-v6mr2528421pgc.209.1524843821214; Fri, 27 Apr 2018 08:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524843821; cv=none; d=google.com; s=arc-20160816; b=kp8sCT2mgfhlbu+PzxmfnQ03b2N8KCKlEpi/FNWqffhGgAJNLBTRi1q/Whsv44K9U4 Zw/IOUZqjJKwGwbK7KpGjfUh7NuIKWT+iC5tjSSzklB0nWKg24+i55zCehjgE6zW9+2o JACiQASwh5TgKOJha+YkS5IF7VcEGQWqbzKRdV28EZnVx2XQqtTrginrWIPL//VmE5cB TErhUwJ++yK3QQmjFqqKR7SBfRPJdnI+mWgOi7tBkn3h6/4se37h0Hi/FOqzjO3gTvIR GcrusZEy+UeSyArFOVtVB7Zfn6YwSU1QrDc/HuagQKycPHsvp9ej6w2VeiDs9GOJcsBo p/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:arc-authentication-results; bh=o8SwUOknQkby4MVjXQChT5+Qx8nd010XRMyvPcf+6Rs=; b=glttCRpIzFHyy7EMkCbd5vMUJ4x3fopeN/+cgV4V//VNb+1FlGUoDTE+Owc2BzUbAz TY6x6lkWYQ+RTi/VYQF8W7LgsDhxfBWZXcivkFi0YF62i4pV2xg0Rvoj2cVwFByq/iM3 lfrXx3SQJFyrbVHP+He6Qz+yFQ0UbMiw4FgL3LBEEUh2F0o59zyx480JfYlL97TtSYMw JDvTlazn0eb0LR5D+UXb3djvkHqAtTJUsT8U3mFRivEdtAfo9MUoScbSMwivp2yoRk9q OWAZ8SpWcq4hkvd13pseCNNPDnO3MPYP7ACFzdbG0cFpPZ4rWp7CvA79fPHhuiIxoIad AezA== 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 d16-v6si1500373plr.141.2018.04.27.08.43.27; Fri, 27 Apr 2018 08:43:41 -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 S1758557AbeD0PmT (ORCPT + 99 others); Fri, 27 Apr 2018 11:42:19 -0400 Received: from mail.efficios.com ([167.114.142.138]:57376 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757457AbeD0PmQ (ORCPT ); Fri, 27 Apr 2018 11:42:16 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 191801AD2D7; Fri, 27 Apr 2018 11:42:16 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yLGdaH2Dvl0y; Fri, 27 Apr 2018 11:42:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 8EB431AD2D3; Fri, 27 Apr 2018 11:42:15 -0400 (EDT) X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KcYuG9ucLhsO; Fri, 27 Apr 2018 11:42:15 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 76D2E1AD2CC; Fri, 27 Apr 2018 11:42:15 -0400 (EDT) Date: Fri, 27 Apr 2018 11:42:15 -0400 (EDT) From: Mathieu Desnoyers To: rostedt 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 Message-ID: <362165882.5842.1524843735295.JavaMail.zimbra@efficios.com> In-Reply-To: <20180427104747.2d965925@gandalf.local.home> References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> Subject: Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.8_GA_2009 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_2009) Thread-Topic: tracepoint: Introduce tracepoint callbacks executing with preempt on Thread-Index: BH5HvqWk/LjMYiOaANkWtrwYKN04ig== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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. 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). Do perf callbacks expect preemption to be disabled ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com