Received: by 10.192.165.148 with SMTP id m20csp909400imm; Fri, 27 Apr 2018 09:24:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqbAccIbCnycDxiub+imBgux3C/Pjl2UPM+mRQ27DSPrusb3kK/j3rXxYuwT/FTiHHVhVb4 X-Received: by 2002:a65:5a81:: with SMTP id c1-v6mr2708322pgt.20.1524846277904; Fri, 27 Apr 2018 09:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524846277; cv=none; d=google.com; s=arc-20160816; b=gcieIdCQlBwkxjJUq2jbzrdEcmHhxPwoSUyVMeDYFcTZUq/Bt9lliuTOjjs8nTDUxo 2GCH5NWPgHYUukAJNf5faAuRtft6J8p7YmIQFeFsavK67+h6XR0KnCHk/NLlMKZMtziw 2Gz03nmtdIzPBJblQy+Sc4Idr9i/f/qbpv7A1QiaTr5OGXQHDDz2C4pbRyFrw3uw4X40 1aWuNs13QkeSpZ7K8g3KF/XuOSkdEvk+09Q3UA2FGJxUYSeSASxV2KCWyBjFYR/TeOIH X1I47uUp4Y8dMbBA1SoJhcmEElIcLKlyh8bl3BS+GP5u3TRdRTbxnlKTXdLJaaYmL2ar qCMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hgHzk2NNGjjDK7KW+3qFBej17PYUrGzEzz44IQBHmcM=; b=UANa5ToA36WJ2IGb6Rh50dlW/eedIAH5XmsvuOz9N2A66F/cHrGGdotLnV+A74jaih 16dXMjZ+SJhlLio+zhn3ynK8FhyyZYgCa6b8rWkrlF8U8ePJeMXznGjV4haCDFuoZU4j DiCrtv0Y/b64IGam8l1CRfgRDH/LwDmv8hWCsv6xTbcABo56VewkASsPZH5Sp6dAT4n8 XqYYMSjT0z5PzpcxWOd7ai4hmf/x5TaJTU3leU5QuZ32J5WA8Yt9fcTgTnjofPccAp4X hzNErpN8OLHJ69QKaZUBm3cVkJqADwEAGFIfWcNd7wXKwn/yoX5/4Faj2CvldDU5nQ3J m/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=esu518nd; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6-v6si1652465plp.18.2018.04.27.09.24.23; Fri, 27 Apr 2018 09:24:37 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=esu518nd; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758669AbeD0QWg (ORCPT + 99 others); Fri, 27 Apr 2018 12:22:36 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:45881 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932901AbeD0QWG (ORCPT ); Fri, 27 Apr 2018 12:22:06 -0400 Received: by mail-io0-f195.google.com with SMTP id r22-v6so3074583ioc.12 for ; Fri, 27 Apr 2018 09:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hgHzk2NNGjjDK7KW+3qFBej17PYUrGzEzz44IQBHmcM=; b=esu518nd7jQH5QVlSerOX4cvbiLs9yhzenf73qj2gNJuESUJopqaMaAXmO8JT/o+WT 9b3uqrSqei0dF3tgMyZnfmyWDJPMUmbvURa5jpWxe77AF5e8vKIr0aqVyKEh0kFgU84f CF5ZxPEyDj8tYODSKPPFw27WYOWd+QzKMD/pSvDGfy3eV40WPz95ePH2hZbgYj7L1GYH wsg8m/ek1xnnMed/axZV7RJCLgXF95pvW0K1SsfNG6/XRjLz94LAby2m8oJrcjDgqoO6 YzNmiH7UdUeAfnJ7/eRvc93htdma1knmx89lBP2h0zUunBcdqlD9ogyroF2DLWiZxeRQ 2xmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hgHzk2NNGjjDK7KW+3qFBej17PYUrGzEzz44IQBHmcM=; b=B0QimYFtwOk7aJTo8wJ7BChm2UVz3mMSBfx4T08sh34dhyZCRHyXCGSgefnsZ5acOI ubrQ1o+aAyGuc0AQMu+vUkGE89jo39ij19BZhn/lwQXdT4M47c5x+PL8VWaITsX3iuJJ OhaDqXzt0HSWidg5O+o/q0Sh0hEiLjZq0FEi4qCt0qwT5ZRJZzhehz2ReQoZk/3DpGVs KAbYTLhalVHrFaGXjxxdorP45j6T2B07Vz8DCzlGwJkGZUQnhso8mlaCpUX/RaPX1T9a sv+eiKDPKjjWnjGj1xNql26DfxUUtEGT3KofZs8n3La9FZ6glroYpPJQB35ukqRtpiTh PwkQ== X-Gm-Message-State: ALQs6tB9IQNcEl7eyGpMPDzteklvyib1IUGgowl6HjTC95xicxiNCTs/ F6cyiqbWtmjsxkWRCOuaDTIQDpHTdecjv2Wj9uv2Y4YW X-Received: by 2002:a6b:2251:: with SMTP id i78-v6mr2760296ioi.276.1524846125014; Fri, 27 Apr 2018 09:22:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.213 with HTTP; Fri, 27 Apr 2018 09:22:04 -0700 (PDT) In-Reply-To: <20180427121330.40b7ef15@gandalf.local.home> References: <20180427042656.190746-1-joelaf@google.com> <20180427155701.GL26088@linux.vnet.ibm.com> <20180427121330.40b7ef15@gandalf.local.home> From: Joel Fernandes Date: Fri, 27 Apr 2018 09:22:04 -0700 Message-ID: Subject: Re: [PATCH RFC] tracepoint: Introduce tracepoint callbacks executing with preempt on To: Steven Rostedt Cc: "Paul E. McKenney" , LKML , Peter Zilstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Glexiner , Boqun Feng , Frederic Weisbecker , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , Baohong Liu , Vedang Patel , "Cc: Android Kernel" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 27, 2018 at 9:13 AM, Steven Rostedt wrote: > On Fri, 27 Apr 2018 08:57:01 -0700 > "Paul E. McKenney" wrote: > >> > + if (preempt_on) { \ >> > + WARN_ON_ONCE(in_nmi()); /* no srcu from nmi */ \ >> >> Very good on this check, thank you! > > I think you need to return and not call the read lock. > > if (WARN_ON_ONCE(in_nmi())) > return; Cool, I'll do that. >> >> > + idx = srcu_read_lock(&tracepoint_srcu); \ >> >> Hmmm... Do I need to create a _notrace variant of srcu_read_lock() >> and srcu_read_unlock()? > > I think so. Oh yes, since otherwise we call into lockdep. Paul, then I think that's true we'd need srcu _notrace variants that don't do the rcu_lock_acquire. Sorry for my earlier email saying its not needed. Thanks, - Joel