Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp655114imm; Wed, 11 Jul 2018 08:45:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVSrCZ0PWL+QAA+FJulht4UqgVPT7YkBL6ugXGE2X3/CRxuB8gidLzBZgDbgVLuwrvRnsC X-Received: by 2002:a17:902:bb90:: with SMTP id m16-v6mr29125538pls.50.1531323923965; Wed, 11 Jul 2018 08:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531323923; cv=none; d=google.com; s=arc-20160816; b=K/jIQy3uvWCS1hpBbzLJLFwDDnIC7CgVEIjD/IWpt8HYgD8tMqutnN1wFoTsKUJzwU Vo1ii/Q0oKgWWA00QknirHKDQWcblgWRsE2RFv7yluo9MAPwL7AiUtzgIlqN12YlZyEB vk9zGat+Bnl3xJ+/C3Rc3bFUNMzSphhA4fybiNpjYtgpu2CqLPdnVn9Gtk/dme2wvfer 4/zCcVWQcqGOQ9jq0n4KPAZgY0w1BjH47Ob3QjYYWLDC4EIGDBYpt35191+q0ChcKTpA JovCCP7TSQ5u5hKUpF1tKnRCY/8XaaLQMnRr74KtoIZbnH00vV72VgVwNHfV9TzCOo97 IL4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xnYN6eOcUG+Pfszb6DiB5nFh5efIWc0LL4DqCPCew1o=; b=zoiSTbodx87hvkeQgQE+iBpnO+dzTPpt57qDgSSsznaApMb83xtxF3DFJ0IJ5uTGpq LHITQZ1oWXbsZd99c9EhEEycc0rNWd8CUOEYccKayFJfAMWIWyMZIWfNPC5XKo2NxIk1 FnNH1Lf3DN6IujHU/Y+aO9IpV29QtApfCJkWNcPPFisQ0gOTGwsEB5GQ0ODZnth06FhD DTiJDdBqxJO4KPoOqDQt0/6qbJm0pJodZ225pGBj20K9StPGcnyQTGHdFqn7FphwOrF/ 7bXVjpoZfgUxIn9YbdCJxp3IjxYk9lUgb47YGgEkwO5Pzuejl1EYYk8xc2VZ3bpeZM0w cR6Q== 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 cd5-v6si20004128plb.174.2018.07.11.08.45.08; Wed, 11 Jul 2018 08:45: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; 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 S2387646AbeGKNEU (ORCPT + 99 others); Wed, 11 Jul 2018 09:04:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:42472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732544AbeGKNEU (ORCPT ); Wed, 11 Jul 2018 09:04:20 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D53AF2086B; Wed, 11 Jul 2018 13:00:04 +0000 (UTC) Date: Wed, 11 Jul 2018 09:00:03 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Joel Fernandes , linux-kernel@vger.kernel.org, Boqun Feng , Byungchul Park , Ingo Molnar , Julia Cartwright , linux-kselftest@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Thomas Glexiner , Tom Zanussi Subject: Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU Message-ID: <20180711090003.42596c2b@gandalf.local.home> In-Reply-To: <20180711124954.GE2476@hirez.programming.kicks-ass.net> References: <20180628182149.226164-1-joel@joelfernandes.org> <20180628182149.226164-5-joel@joelfernandes.org> <20180711124954.GE2476@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Jul 2018 14:49:54 +0200 Peter Zijlstra wrote: > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ > > I would convert to rcu_dereference_raw() to appease sparse. The fancy > stuff below is pointless if you then turn off all checking. The problem with doing this is if we use a trace event without the proper _idle() or whatever, we wont get a warning that it is used incorrectly with lockdep. Or does lockdep still check if "rcu is watching" with rcu_dereference_raw()? -- Steve > > > + \ > > + /* \ > > + * For rcuidle callers, use srcu since sched-rcu \ > > + * doesn't work from the idle path. \ > > + */ \ > > + if (rcuidle) { \ > > + if (in_nmi()) { \ > > + WARN_ON_ONCE(1); \ > > + return; /* no srcu from nmi */ \ > > + } \ > > + \ > > + idx = srcu_read_lock_notrace(&tracepoint_srcu); \ > > + it_func_ptr = \ > > + srcu_dereference_notrace((tp)->funcs, \ > > + &tracepoint_srcu); \ > > + /* To keep it consistent with !rcuidle path */ \ > > + preempt_disable_notrace(); \ > > + } else { \ > > + rcu_read_lock_sched_notrace(); \ > > + it_func_ptr = \ > > + rcu_dereference_sched((tp)->funcs); \ > > + } \