Received: by 10.192.165.148 with SMTP id m20csp1048275imm; Fri, 27 Apr 2018 11:43:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqDoGXDm5sY6vu89Ot/J9xsICbeVqo3wXFXvpDaNOmjggD1CesAD5kyUO8p30vxr/MS48+x X-Received: by 2002:a17:902:590d:: with SMTP id o13-v6mr3241414pli.130.1524854635574; Fri, 27 Apr 2018 11:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524854635; cv=none; d=google.com; s=arc-20160816; b=bizivyQtcb+dzG6RkdHDKOD4RARbCKmdf19ZYyWi0csVnrmPJMX2mboSa1qeikcaV9 At9pdOdzE18DC4XPqmxGGUdKD0PLmdIOLaPcuJSmH6sPVplY/mCxozehHtyL0oN/6w1a kW5SNYU356xjE4iC7Zg5zf9wNIJVX/D/r8OvfbjEqBNeKOW2fHzc93ikR3MpfHYeA1Hh WlBxHtCYX+hk6k4lW5kLyBrFxnG4lErc7XRbfzwkxJJ6EHKhDxwx9rwFHrKMeDtEr+W6 3IdW1NpnhhhdU+Pqsz/YLRJeCzLysedyvR4QWsH8LQ5V3H15wq67pTT/tX87cZRtm6PF d/5w== 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=VIR7JkMMn12mQchx67lG0iuSBp4kaxUZUHMVWnhipBo=; b=kUM6sLbvOZrXWbEjE7VMGnm2Hr3wgznKsHnmNnkvLadwOXSA7J5JAmDButTe2O7/nL Jsr/OJ0o0VwvVPyvcSuZnB2RRFefXZVupA57Why4M3jnGPwz6kNbNZ6kBILlfXBFYJSX o5vKU8Xs/qRnIwLeUqj1UE8cA5vMiUKEnWEPbMPb1+4R+dGnrW/k9fstLAV4Pa0XAnRS CtA8nEJ8tvOS1c8v9aJj/HuFdLzEhQrCKYvxGVOQUxRR5PaIHkNuNmmaYdbFFgk3QqJj KE3wrhzv0hx91N70EU/fGpPrtdiHH3WxDMgjgBynj+7+ukjskZ9VPpUW8W1APuIcSMBM esEA== 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 x6-v6si1646617plr.333.2018.04.27.11.43.41; Fri, 27 Apr 2018 11:43:55 -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 S1758270AbeD0Smb (ORCPT + 99 others); Fri, 27 Apr 2018 14:42:31 -0400 Received: from mail.efficios.com ([167.114.142.138]:42260 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757577AbeD0Sma (ORCPT ); Fri, 27 Apr 2018 14:42:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 5900A1B8995; Fri, 27 Apr 2018 14:42:29 -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 Lrz6VmZ_idMo; Fri, 27 Apr 2018 14:42:28 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 8F0551B8992; Fri, 27 Apr 2018 14:42:28 -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 gcpsfwqVkKYD; Fri, 27 Apr 2018 14:42:28 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 75D341B898B; Fri, 27 Apr 2018 14:42:28 -0400 (EDT) Date: Fri, 27 Apr 2018 14:42:28 -0400 (EDT) From: Mathieu Desnoyers To: Joel Fernandes Cc: rostedt , 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: <1612196617.5918.1524854548327.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> <20180427123759.0bc4b8de@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: hDqheKS1TE59hH+N7DiwFmKPLeKWqg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 27, 2018, at 2:11 PM, Joel Fernandes joelaf@google.com wrote: > On Fri, Apr 27, 2018 at 9:37 AM, Steven Rostedt wrote: >> On Fri, 27 Apr 2018 09:30:05 -0700 >> Joel Fernandes wrote: >> >>> On Fri, Apr 27, 2018 at 7:47 AM, Steven Rostedt 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. >>> >>> Here is the list of all callers of the _rcuidle : >> >> I was thinking of auditing who registers callbacks to any tracepoints. > > Ok. If you feel strongly about this, I think for now I could also just > wrap the callback execution with preempt_disable_notrace. And, when/if > we get to doing the blocking callbacks work, we can considering > keeping preempts on. My main point here is to introduce the minimal change (keeping preemption disabled) needed for the rcuidle variant, and only tackle the work of dealing with preemptible callbacks when we really need it and when we can properly test it (e.g. by using it for syscall entry/exit tracing). Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com