Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp936680imm; Wed, 20 Jun 2018 08:57:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIgR86uD0xL6LQ9cA+TwG0+x6KyYVW0ufw/mZJEDZxqD+mU6IW5Uddpe15Hm3pVTCBLI0P8 X-Received: by 2002:a17:902:a581:: with SMTP id az1-v6mr24691436plb.61.1529510225983; Wed, 20 Jun 2018 08:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529510225; cv=none; d=google.com; s=arc-20160816; b=VXIQxuH2JYIt0DfSdZW6DneNU7y/yT0zY0ofXfNRfP+m7hHvGEBuvPzmSpPR9qxz7v J6+r6ey8+KTXQlfD6wUTEinaumMEQNJKx8/tgGh3ME+7aBSUllHgtNSoOahum0J//9FE r2J6jkhQr0GNqMCRtrpKiKtSvbhOKbr1B9Q/+yUc3dyKW1PzXriVpCtYBhMyXwWsU3s2 EWngtIPYvL0qwmvYntmn83JJzg/i8i9gYmNSkqDkFAHaVwr1t0b3ZCRkozMrfvetFgBD jnriaMZTG5S6kN0OE/tYwZ7neD1KDvEYT/ZGd85XH3dbn4+ELr2X9z29xdOna7c1XMVu asyA== 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=VrdXJatADtCfj1EpHGIC7nLcij51Zz1caVHL2hKPceA=; b=GHOpD6JzGm9KQPX+LMAJiVgGgM6hATHsQuApV7MSLzesSsnVE4hK8z8DVcus4eKZCr hI0El4pSA+VRKkp1jWYTa6wBa2jnCyNdHWL+jOMfvIZVoykaXVL4RNDm85CdYOnebexb 0+8CmY2y2kz9UZ5gpzYk8Nd0n6H0Ya1wZlYUAaXa8gBqwrlEpPczBySa8qGYgS7JNzlA nryZlwI88KXynjW8MH8XvizpHAtxvr8f1bjzYRqPX0gyRT8wGCn48vHpANlIsxu9+b6l yohDfEULAlE2DwYeEGPPjYuiFObtCYQDJHFyCdlbaZG6jp8TKG8u2kZha8F7kMdniDaC 7Stw== 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 x12-v6si2142730pgt.362.2018.06.20.08.56.51; Wed, 20 Jun 2018 08:57:05 -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 S1754244AbeFTPzE (ORCPT + 99 others); Wed, 20 Jun 2018 11:55:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55390 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754011AbeFTPzD (ORCPT ); Wed, 20 Jun 2018 11:55:03 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5KFpXmU137855 for ; Wed, 20 Jun 2018 11:55:03 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jqsbnsmtf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Jun 2018 11:55:02 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jun 2018 11:55:02 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 20 Jun 2018 11:54:57 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5KFsumL9503062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 Jun 2018 15:54:56 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22E6DB2070; Wed, 20 Jun 2018 11:54:45 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 04249B205F; Wed, 20 Jun 2018 11:54:45 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 20 Jun 2018 11:54:44 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 0EE3616C6B1D; Wed, 20 Jun 2018 08:56:58 -0700 (PDT) Date: Wed, 20 Jun 2018 08:56:58 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Byungchul Park , jiangshanlai@gmail.com, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, kernel-team@lge.com, joel@joelfernandes.org Subject: Re: [RFC 1/2] rcu: Do prepare and cleanup idle depending on in_nmi() Reply-To: paulmck@linux.vnet.ibm.com References: <1529484440-20634-1-git-send-email-byungchul.park@lge.com> <20180620145058.GP3593@linux.vnet.ibm.com> <20180620114335.7a314642@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180620114335.7a314642@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18062015-2213-0000-0000-000002BCBBFA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009227; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01049774; UDB=6.00537929; IPR=6.00828746; MB=3.00021761; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-20 15:55:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062015-2214-0000-0000-00005A8C0D12 Message-Id: <20180620155658.GU3593@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-20_07:,, 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806200174 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 20, 2018 at 11:43:35AM -0400, Steven Rostedt wrote: > On Wed, 20 Jun 2018 07:50:58 -0700 > "Paul E. McKenney" wrote: > > > On Wed, Jun 20, 2018 at 05:47:19PM +0900, Byungchul Park wrote: > > > Get rid of dependency on ->dynticks_nmi_nesting. > > > > > > Signed-off-by: Byungchul Park > > > --- > > > kernel/rcu/tree.c | 22 ++++++++++------------ > > > 1 file changed, 10 insertions(+), 12 deletions(-) > > > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > > index deb2508..59ae94e 100644 > > > --- a/kernel/rcu/tree.c > > > +++ b/kernel/rcu/tree.c > > > @@ -797,6 +797,11 @@ void rcu_nmi_exit(void) > > > return; > > > } > > > > > > + if (!in_nmi()) { > > > > Is in_nmi() sufficiently reliable for use here? In the past, there have > > been tracepoints that invoked these functions between the time that the > > handlers were entered and the time that software updated the state so that > > the various handler-check functions (such as in_nmi()) would return true. > > > > Steve, has there been any change in this situation? > > There shouldn't be any "trace events", but what we had to deal with was > function tracing. And in the near future, we will be getting "function > based events" that will allow you to create an event in any function. > > That said, even the function tracer shouldn't be called from the time > the NMI triggers to "in_nmi()" is set. Because there's some function > tracer callbacks that should not be executed from an NMI, and I use > in_nmi() to determine if they get called or not. OK, so in theory this change is safe from a tracing perspective. But it does add conditionals to a fastpath. Byungchul, is there any reason to make this change other than preparation for your second patch? Thanx, Paul