Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp934172imm; Wed, 11 Jul 2018 13:45:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfp6gXlJ1/9UsfEQYpfd+2VtfSKvLqSOAS4ETcCWhOOWRIwD+d335xTDgHzoHPhKjNH/g7u X-Received: by 2002:a17:902:b693:: with SMTP id c19-v6mr170963pls.114.1531341944582; Wed, 11 Jul 2018 13:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531341944; cv=none; d=google.com; s=arc-20160816; b=rWaV9jSh4kbcKG3F+3F8y3EHmfbCZsIfaGoA71fWYRU55wG1qeCCcIb+fyVSpnsKhu pAXKB1rClvkCbtOGiEZXJeP/LhUjqMvQuffZ1vp6SzFkj8Lj0h+Bi2jaqa7EsiplSLuq MeHBTK7ZBHh0/M0zQW8Jbqrk+Nfq8kxUutBaPZbhFwmDcvZ71R/7fJwtn9Kpk/QcWvbt jNJ7nySg3aoPH4CMFpkq/OS01fvboiINIIktZwT2TZCHZUI3LV4mvlkGY0PZ8Lzj1zWI EE/yTLAzUKYUWTWJjVItM9B9KI6JFuUOGqwZPCvlYIROW6CAN3MADQ3YWNokCFhhGXu1 +fsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=RAPM9/zBNenNkyX4/iOhuP9oYcAmhk/7NQCtjJq/e3U=; b=sbm4hvkA2uNH9EB181InOKJDoDQTsJzi9g1rfhJZxLaZzdE57x1Kt08LNyAMzR35eK 0i4iBIO7VY1UXY6dC/GZkjPwgLu1CCYAxP0SmEmhNAAjb9njsPleAhIHd+xRYY9+VlfT cDMNof5WwhwrHc51VX/wLa9ShdrytyW+pCa9vNQXbOv1MUA5jfr/xv9HvRleS4o2/Pvt aXFAmmLgVAcT0CpK3G01CEV6ZvZ9q61wQarijUlbuDmPNKEM7QxcOxSj/1j1MMJbHEyE Fbg4WKDaHRmSr66I3X5XWP9lxJWPny0KS8zMRQVfudLiS8OP7+V7Y8A4NBkSPNu3r6AW c9ug== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l33-v6si19440469pgm.350.2018.07.11.13.45.29; Wed, 11 Jul 2018 13:45:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388622AbeGKOaJ (ORCPT + 99 others); Wed, 11 Jul 2018 10:30:09 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53494 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388569AbeGKOaI (ORCPT ); Wed, 11 Jul 2018 10:30:08 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6BENqlP110373 for ; Wed, 11 Jul 2018 10:25:31 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k5k41hnfs-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 11 Jul 2018 10:25:31 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Jul 2018 10:25:30 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 11 Jul 2018 10:25:25 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6BEPPJU9699782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Jul 2018 14:25:25 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96DCFB2065; Wed, 11 Jul 2018 10:25:24 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 77A1CB205F; Wed, 11 Jul 2018 10:25:24 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 11 Jul 2018 10:25:24 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 0D8BE16C196F; Wed, 11 Jul 2018 07:27:44 -0700 (PDT) Date: Wed, 11 Jul 2018 07:27:44 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Peter Zijlstra , 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 , Thomas Glexiner , Tom Zanussi Subject: Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU Reply-To: paulmck@linux.vnet.ibm.com References: <20180628182149.226164-1-joel@joelfernandes.org> <20180628182149.226164-5-joel@joelfernandes.org> <20180711124954.GE2476@hirez.programming.kicks-ass.net> <20180711090003.42596c2b@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711090003.42596c2b@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18071114-0068-0000-0000-000003166C5F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009350; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01059814; UDB=6.00543956; IPR=6.00837734; MB=3.00022102; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-11 14:25:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071114-0069-0000-0000-000044FE3A1D Message-Id: <20180711142744.GN3593@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-11_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=808 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807110156 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > 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()? No lockdep checking is done by rcu_dereference_raw(). Thanx, Paul > -- 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); \ > > > + } \ >