Received: by 10.192.165.148 with SMTP id m20csp865653imm; Fri, 27 Apr 2018 08:45:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr4wJe2LD3HsBr9ntnkdkGqR7lZk0SOOIRodDV+Kz50E97pKQ/iRgYrtJy59HUUVh0Cy+0D X-Received: by 2002:a63:7052:: with SMTP id a18-v6mr2570058pgn.148.1524843926757; Fri, 27 Apr 2018 08:45:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524843926; cv=none; d=google.com; s=arc-20160816; b=AS6M0K6ulB2SC74w52AMmCTxurjVJClX9ZFS80bm1Zha3qJL0Igd5lSXVMMJkuTXZE yUihGM2gRwWu1a9kp71ucM/pe+V5KVZ8MkQ3bER8HL/LbDcZa4ElecjDVInR3hwmjF1+ 6yLG/UqAD4cp1xjdxsUb6UdVMJpiCAhNZYFUHiqIPlOW2vD6PHoG0j/UeymGI+FnJGNB Zycomb8Ksr4pUL5u93TjyUnPNJDqS1TQtiRzCBqCFzG4AzdTf3ufjkrBfn2LGpk+qmY8 kPsRaZdheZ46xhBkcGnDaIqX1yLZrhHF5tk/hekhpr4+BDFKJQ3OckXhXiY43Tq/8EnS bcDA== 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=9Yqo1VKtl0hn5xjlSDekWmiNnr3gdmF4EizR3e9ZquM=; b=Uj4TTo1fovyVEBaKUmU5dqDYPayXmb1a6sJD9fs9zkCYFrZrrUZ9/NkxSzz+U4/+HB 7/+WHNege7AvfjZKWnRHu0j6HmKPPf3supbr8/mPbEi44CXziML/giveGYW6duMVex3e NOpsbrcNaGYF1TWDoGzc4PIei05g5w1u1Fal1ZFUWb5JUeIu9WlCswApmxeAoKsqbRr4 fOi0bzR4uRSrz7DPTl3jXCE6TdN2j/0q6F2gJ+HIerC3d09xWo1qmCbgekgcgoC1nWXv l0fUTixAsIjDkFj9HqqYrjyrc4B+CkHpfbxIVDbHpvNKEAIn4E7r/A70ROTS3K6zqLhY 26fQ== 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 h3-v6si1477094pld.137.2018.04.27.08.45.03; Fri, 27 Apr 2018 08:45:26 -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 S1758353AbeD0Pno (ORCPT + 99 others); Fri, 27 Apr 2018 11:43:44 -0400 Received: from mail.efficios.com ([167.114.142.138]:57438 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752061AbeD0Pnm (ORCPT ); Fri, 27 Apr 2018 11:43:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4B1F21AD30F; Fri, 27 Apr 2018 11:43:42 -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 fVt_H-V5URBC; Fri, 27 Apr 2018 11:43:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id D792C1AD308; Fri, 27 Apr 2018 11:43:41 -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 jDxFgudugU-g; Fri, 27 Apr 2018 11:43:41 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id BD5941AD301; Fri, 27 Apr 2018 11:43:41 -0400 (EDT) Date: Fri, 27 Apr 2018 11:43:41 -0400 (EDT) From: Mathieu Desnoyers To: rostedt Cc: "Paul E. McKenney" , Joel Fernandes , linux-kernel , Peter Zijlstra , Ingo Molnar , Tom Zanussi , Namhyung Kim , Thomas Gleixner , Boqun Feng , fweisbec , Randy Dunlap , Masami Hiramatsu , kbuild test robot , baohong liu , vedang patel , kernel-team Message-ID: <1953337577.5844.1524843821731.JavaMail.zimbra@efficios.com> In-Reply-To: <20180427114005.31d1e8ab@gandalf.local.home> References: <20180427042656.190746-1-joelaf@google.com> <1169911546.5820.1524839189395.JavaMail.zimbra@efficios.com> <20180427104747.2d965925@gandalf.local.home> <20180427153826.GK26088@linux.vnet.ibm.com> <20180427114005.31d1e8ab@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: uGfmIaQW6AeHRGCAYeYIDe7deQIzzQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 27, 2018, at 11:40 AM, rostedt rostedt@goodmis.org wrote: > On Fri, 27 Apr 2018 08:38:26 -0700 > "Paul E. McKenney" wrote: > >> On Fri, Apr 27, 2018 at 10:47:47AM -0400, 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. >> >> Are you really sure you want to increase your state space that much? > > Why not? The code I have in callbacks already deals with all sorts of > context - normal, softirq, irq, NMI, preemption disabled, irq > disabled. It does so by disabling preemption in the callbacks, even when it's redundant with the guarantees already provided by tracepoint-sched-rcu and by kprobes. It's not that great for a fast-path. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com