From patchwork Tue Mar 26 23:13:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 161237 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5794110jan; Tue, 26 Mar 2019 16:14:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhmFMopW/siw7U1RXDmKiwovfaorBne5jXJrjgNfqw1ST7BoL/T6AFcLPrl4Z6UXkplxoE X-Received: by 2002:aa7:9193:: with SMTP id x19mr23766720pfa.108.1553642076694; Tue, 26 Mar 2019 16:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553642076; cv=none; d=google.com; s=arc-20160816; b=MM2vAjixkCrXeRGfDR1N8mY1quLlHAtLrk0rEGev1BKP0wQKwNmWJO+VzXtl0b7d7B SUy6TC8wqBc4onNGv/OeXmwQxf63JobvUXzcrZRBlydfmKxNeFACE93m7p3LWcYV+msb oXXWw8qXeM+rU8ww5jZQUSIM31aQ+NWUMBoiHv4S3jUQekmLGU+mcD7PvTO44IqTaz1z RiZkZFtE9l9jg0RO26GP4hAU3V2RQIMHqakx2Lga6B7dEQsjhIHh76RmNvQ41Y9MiAeA yY27y8nhzA2vfsy7VlRVRKK8j3zdFdNDUZ7wf2JrVDX27ws6AuBi/J2UlHKkaLESZi3/ bxmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=um04DrOzWUf2RfvPU8gV+wzIWirEMduR+xnMuJsfW54=; b=D6nS74q9IhmHVQqJbE4+yF1EVOAOHWbYwiS4kbg6/bPz7yJ905mqKzKZo1EM1Y/+fJ Glbb5NT8we4rgYJPcdjSDS2lGhyM9GaniDLCerYvMDYTQ/BlUI0WkNcQvrzDamSSxxBo FSUVYpo3LjN3w55W5OwysaHI/SwgSZQfdNfZ/+ahn2qcuhgHOBYhiKUTdblERl/lv4ex 4foib56f6/RAoxHalV5F9IAiMIqF0DIjwEj+HPR3fcFw8GYbOI1Zjy02pmpDcYD1Qk9F IKGgc2xEmFoGsXNZaUspnMSGInx3CrgdniaQqmIZc0BzMMACdKAl/jQV5pPAPxQ8uD3B /aMA== 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 u18si16767318pfm.84.2019.03.26.16.14.36; Tue, 26 Mar 2019 16:14:36 -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 S1733134AbfCZXOe (ORCPT + 31 others); Tue, 26 Mar 2019 19:14:34 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51790 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732834AbfCZXNX (ORCPT ); Tue, 26 Mar 2019 19:13:23 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2QN9M46114403 for ; Tue, 26 Mar 2019 19:13:22 -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 2rfst60s1a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 26 Mar 2019 19:13:22 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Mar 2019 23:13:21 -0000 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) 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) Tue, 26 Mar 2019 23:13:16 -0000 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 x2QNDEwv7602336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Mar 2019 23:13:15 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2BE1B2076; Tue, 26 Mar 2019 23:13:14 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9DC1AB206B; Tue, 26 Mar 2019 23:13:14 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.188]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 26 Mar 2019 23:13:14 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 7F27516C611D; Tue, 26 Mar 2019 16:13:15 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Akira Yokosawa , "Paul E . McKenney" Subject: [PATCH tip/core/rcu 08/18] rcu: Move common code out of if-else block Date: Tue, 26 Mar 2019 16:13:04 -0700 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190326231253.GA18343@linux.ibm.com> References: <20190326231253.GA18343@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19032623-0068-0000-0000-000003AB74A0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010820; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000282; SDB=6.01180132; UDB=6.00617573; IPR=6.00960848; MB=3.00026169; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-26 23:13:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19032623-0069-0000-0000-000047F21E3B Message-Id: <20190326231314.19518-8-paulmck@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-26_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=13 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-1810050000 definitions=main-1903260156 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Akira Yokosawa As the result of recent addition of "rdp->core_needs_qs = false;" in the "if" block, now both branches of the if-else have the same assignment. Factor it out and reduce line count. Signed-off-by: Akira Yokosawa Cc: Joel Fernandes Signed-off-by: Paul E. McKenney Acked-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 296131450414..5aefd36ac648 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2295,12 +2295,10 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp) return; } mask = rdp->grpmask; + rdp->core_needs_qs = false; if ((rnp->qsmask & mask) == 0) { - rdp->core_needs_qs = false; raw_spin_unlock_irqrestore_rcu_node(rnp, flags); } else { - rdp->core_needs_qs = false; - /* * This GP can't end until cpu checks in, so all of our * callbacks can be processed during the next GP.