Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp973529imm; Wed, 20 Jun 2018 09:29:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJfR62LULOkN0+E/114lXvcTDRy8TEe448tfXwAW4ZwSAgwG/KDw83vBOEt6Xgz3Up6A2IL X-Received: by 2002:a62:5601:: with SMTP id k1-v6mr23645524pfb.212.1529512153494; Wed, 20 Jun 2018 09:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529512153; cv=none; d=google.com; s=arc-20160816; b=wdeizw5EQXqsWqD0eCmkeU4ztTwl3wp5hCsX5oQKL3Rp+ax8DJI6oP65IQOxrBlLfU nRkqLEGWNI2mkOJDOKUKBrOr4Qrs3C0+soOhbPHFJt7L+hYuW8zXPpquYmjqiW2/uCdW lE4BFEicRwYqgHZbbx7KD3x6s3sqhGAmnl3oQ2mMcMHQP4je2sDzPYFp7XheLxRgbvdh Y2x0DhdNKSQj5Y2eRqiXr2GJgJLwGMXQBY3T4rEUe/v8DSTYRMA0hNIWNECv6qZJKiYS Nim+JfpR7MRklY7oHP8DljDAy/q9ZV1dlkEsBTXwmDi9SmR1vpp+m3rzRrlRSfmuAEFE 9sHg== 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=AwFfeCSVSzFYz5NmptchnnMAmr4i+hPCosZtKd+adJA=; b=gwXCwCezWBZZU5UK6vSwZbxiGKfXPNHixzyiMukpyLuWjcz+JlvJGdd5dNHpcJybgX rjzQkoEMiUQSacfweJG0WKLk21N9vsAeBArCRaCRQx0vVmHujqDLnPUlgs76M/vBCIlT 8q45gi4F6imRWwruJbktFZ2hP0KJkW4eW7q8ZJZo+FAAf6pDuBKzOro0di0PVMdwZazC R1Wob6Ng8O7EW2cK0LrJ6GrgOmJJB05tAUdWsmoChxip/MTPI/P8n7I0A5oq3224RrV6 clEvHx4nlg1e+k7MUJfrChoKlk8lPSpEXq1QTtcEL8U6ut0F0CtmJWtcLcEiYIr7MECQ U8JA== 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 e12-v6si2177377pgn.171.2018.06.20.09.28.59; Wed, 20 Jun 2018 09:29:13 -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 S932153AbeFTQ2S (ORCPT + 99 others); Wed, 20 Jun 2018 12:28:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46856 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754354AbeFTQ2P (ORCPT ); Wed, 20 Jun 2018 12:28:15 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5KGODN1087023 for ; Wed, 20 Jun 2018 12:28:15 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jqsnmae6n-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Jun 2018 12:28:15 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jun 2018 12:28:14 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) 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 12:28:11 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5KGSAow19530138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 Jun 2018 16:28:10 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 546DBB2065; Wed, 20 Jun 2018 12:27:58 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 360AEB2064; Wed, 20 Jun 2018 12:27:58 -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 12:27:58 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 4E52B16C9B40; Wed, 20 Jun 2018 09:30:11 -0700 (PDT) Date: Wed, 20 Jun 2018 09:30:11 -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> <20180620155658.GU3593@linux.vnet.ibm.com> <20180620121156.4da98db2@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180620121156.4da98db2@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18062016-0060-0000-0000-000002803A48 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.01049784; UDB=6.00537935; IPR=6.00828757; MB=3.00021761; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-20 16:28:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062016-0061-0000-0000-0000458492A8 Message-Id: <20180620163011.GV3593@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=909 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806200180 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 12:11:56PM -0400, Steven Rostedt wrote: > On Wed, 20 Jun 2018 08:56:58 -0700 > "Paul E. McKenney" wrote: > > > OK, so in theory this change is safe from a tracing perspective. But > > it does add conditionals to a fastpath. > > Does it? > > I see it replacing two conditions from both rcu_irq_enter/exit() with a > single one in rcu_nmi_enter/exit(). Sure it adds one to rcu_nmi_enter() > but that's a far less fast path than rcu_irq_enter(), which this patch > removes a conditional from. Fair point. But I am still a bit nervous about the in_nmi(). That could be avoided by an argument to rcu_nmi_enter() and rcu_nmi_exit() (or common-code functions derived from these), and the usual inlining should eliminate both the argument and the check from generated code. However, it is also the case that the original invokes rcu_dynticks_task_exit() before the rcu_dynticks_eqs_exit() and rcu_cleanup_after_idle() afterwards, and the new code executes them both afterwards. Why is this transformation safe? Thanx, Paul