Received: by 10.192.165.148 with SMTP id m20csp3696682imm; Mon, 7 May 2018 17:38:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqIBUSqckfSjhZltFWHg1z5S6Kw5SHVxoafHlbAMfAL9ip1BULdEd7LfE3IbYYhXkGGqkJg X-Received: by 10.98.102.66 with SMTP id a63mr17381971pfc.162.1525739904511; Mon, 07 May 2018 17:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525739904; cv=none; d=google.com; s=arc-20160816; b=Gvhwybs3pzKzS+EE3m8v7ZWQX1h2THM3Uf1qWmQci+aBYLmkDgEGaHdp8GHa3IB907 vo6uIfsM2jOC11T9FBLtacK+QmgyB4smV9lMTH3vKty4ZxiC26QGn5BSuVnKUI+V9Ocb vW0x3LGf5Fxas7M+xoqaWQkhXeuW08j67/e3bZYE5m0rMsLy4RWGVta9T2amSeyB9lb8 xSL3YaC8Urf+oJ+JOhltL+P2ip4y0qK3L2zqQLM1pRPVPQag5KBi4sro51SAqD5MefYP fBvkqGMPeeL3WfejqTtXbVKL7ql1jdMIKOABef/6LD1kDK1u/yNqx1Hfa4zdXxyKk/wJ BGwQ== 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:dkim-signature:dkim-filter :arc-authentication-results; bh=nbLnIB9oSe/mGtGVJKm1mYQ2TEXDY8YunOUC8FzAXXk=; b=SJ1TnKVLMHR/1bCUo8Q+f1zrr20TUa5RIsSvVJvkgMUJHTTZ5CwS6DkIXi5ayBQYjp 7uYFf7O9y49jwy2LsJoj03bED34+Oq8tH5ih6znp5qT9vl5kIfKgr6mw3tYjyxKZKpig nK2miAeKtiUxRSHoKAp08TSuluPb2VRU9e6+rKbAwQ44G9BsFcbcUG8yajz6uqmySRma ee8ejMQRxqXrtsoZ/VJrJIKp44aOdis5XrW9MVHqoCDqzxAP+VU2HPp3XB3AAFTMYA5Y 6D59R4Djucz81zfmF/JR9PYCw6Sax6EGyHRYLW3tR6amc7Ro/9dcZMrgQmyMoEvXqsqy 5dEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=F3fMYLvW; 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=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si23265630plb.301.2018.05.07.17.38.08; Mon, 07 May 2018 17:38:23 -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=@efficios.com header.s=default header.b=F3fMYLvW; 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=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753780AbeEHAh5 (ORCPT + 99 others); Mon, 7 May 2018 20:37:57 -0400 Received: from mail.efficios.com ([167.114.142.138]:38054 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752954AbeEHAh4 (ORCPT ); Mon, 7 May 2018 20:37:56 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 713841BA67F; Mon, 7 May 2018 20:37:55 -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 BEVV_trqg4KC; Mon, 7 May 2018 20:37:54 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 8B9F01BA67C; Mon, 7 May 2018 20:37:54 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 8B9F01BA67C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1525739874; bh=nbLnIB9oSe/mGtGVJKm1mYQ2TEXDY8YunOUC8FzAXXk=; h=Date:From:To:Message-ID:MIME-Version; b=F3fMYLvW9TGijf2qsOJpxYOISE1EHPekosenmFV/8eD8HkI/Ew9virX1GFCUhwBJF krmo6mu5WPSCqLz4ivfSFXQev6JKYv15owLUlLDX2M5aZY7TiWGw4o/QSTY5y2obvV Rq5+hXVeVk0LgG3FxAAAmnij9W9k13RKXJ+fs2cMJmAo4enma0arNUvO+kXqU7hV8+ OtekiFVMn+wgXRG22CnLdtZLnPE4J8sEhiu6eUj3G1/PxcozSpgYZDXGVrtOLf+OIW sgRNI21OsGjLYDdP1wz2NzlqpO0y/cvSqAx1A3qr759ED6mCscx/gTixv+roC8OqJC Vym+sA74aWrSw== 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 ihI4EG8gGZzX; Mon, 7 May 2018 20:37:54 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 722891BA673; Mon, 7 May 2018 20:37:54 -0400 (EDT) Date: Mon, 7 May 2018 20:37:54 -0400 (EDT) From: Mathieu Desnoyers To: "Joel Fernandes, Google" Cc: Joel Fernandes , linux-kernel , rostedt , 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: <581097661.279.1525739874243.JavaMail.zimbra@efficios.com> In-Reply-To: <20180507214611.GB13787@joelaf.mtv.corp.google.com> References: <20180507204143.13061-1-joelaf@google.com> <20180507204143.13061-5-joelaf@google.com> <568999860.209.1525727141943.JavaMail.zimbra@efficios.com> <20180507214611.GB13787@joelaf.mtv.corp.google.com> Subject: Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU 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_2026 (ZimbraWebClient - FF52 (Linux)/8.8.8_GA_2031) Thread-Topic: tracepoint: Make rcuidle tracepoint callers use SRCU Thread-Index: 4UmjehCNl+iIobHzzsO6mekyemh1zg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 7, 2018, at 5:46 PM, Joel Fernandes, Google joel@joelfernandes.org wrote: > On Mon, May 07, 2018 at 05:05:41PM -0400, Mathieu Desnoyers wrote: >> ----- On May 7, 2018, at 4:41 PM, Joel Fernandes joelaf@google.com wrote: >> [...] >> > +extern struct srcu_struct tracepoint_srcu; >> > + >> > extern int >> > tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data); >> > extern int >> > @@ -77,6 +80,9 @@ int unregister_tracepoint_module_notifier(struct >> > notifier_block *nb) >> > */ >> > static inline void tracepoint_synchronize_unregister(void) >> > { >> > +#ifdef CONFIG_TRACEPOINTS >> > + synchronize_srcu(&tracepoint_srcu); >> > +#endif >> > synchronize_sched(); >> >> Why is this ifdef needed ? > > tracepoint_srcu is defined in tracepoint.c so if we don't protect usage here, it > would cause a build error. Then we should ifdef the entire implementation of tracepoint_synchronize_unregister(). There is no point in issuing synchronize_sched() when code invokes that function on a CONFIG_TRACEPOINTS=n config. Thanks, Mathieu > > thanks, > > - Joel -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com