Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp118687imm; Wed, 29 Aug 2018 15:44:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbdZJdKpUOUVAQkKwrKK8NuulIngSIZk2j3dgGc4oDCDb3on4gaKk8D25+agKMV+hlhMlLZ X-Received: by 2002:a62:8d7:: with SMTP id 84-v6mr7882263pfi.172.1535582654604; Wed, 29 Aug 2018 15:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535582654; cv=none; d=google.com; s=arc-20160816; b=SExUxZ891csjEOPaO09RIsXq7ZXx//jGR6bM0q/7civocZg4Yv3YYhxli6w5oH6dST WykKwo+MNxmg1mvVLkG6xDVrtbD/LsJHIwwmIQg47hKws3LjYLyW1Bdf8AjByW3bgr1C OWSevdEkaMyQVsQ+t/RGOy3Q/ko0jaP0FvOoMlHIlAA1vPsqaPipZ/0DRqayReSaFtR6 NGqiDLfhAvXS8EzlEQfj/8xrBWhL1/ZxckwbfIU5uaWc79XTr2/7T9VX2oTOgajDrS3c TYN3IK3lrxLOIQ92SGILLpHrmeqRoX3vzt9RhTVQ/TzboXnHYPmPJWWyJWE59edf+Pfl 01lw== 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:arc-authentication-results; bh=+VzsHjX6W4s+f5+WdeWlTdmuu1hdmT9P58fzWlNhplU=; b=Iy+RMbW8Lq6F8N9iquz/PXBeb8MBHIDJ/TRSoJjjAOwmNltchdPtRlMzLsnB1J5RD6 Bq1qXoa41mhZfbgeN1AAN+1GJP/qd3YIdHbzBuTpEnuCxsCfQ7kNnh4C/Ida97kMGj45 Oz5D3u7rIoMXW53YwFZZWFIGbetmjiXfiAhVakUOVnLJJ+n4ii3EwjuALaSdyZGsLWLm vvVe6QdnIy9lcaYMUEwEc/SlQ32JJWIdvAe7HVFD6ai+p6gyd/L+Q7SBDflpO2rppv0d ltC//Oi2F2nNoE1rJvA/P5iCmZbQ9X/saWbl7S9HMJzT0DqFATzaEbIxYqg2/K2cU2Wg XkgA== 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 x63-v6si4975235pfb.299.2018.08.29.15.44.00; Wed, 29 Aug 2018 15:44:14 -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 S1727653AbeH3CiH (ORCPT + 99 others); Wed, 29 Aug 2018 22:38:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47654 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727471AbeH3CiG (ORCPT ); Wed, 29 Aug 2018 22:38:06 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7TMckrS116449 for ; Wed, 29 Aug 2018 18:39:02 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m6158y7cr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 29 Aug 2018 18:39:02 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Aug 2018 18:39:01 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 29 Aug 2018 18:38:57 -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 w7TMcugm15925272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Aug 2018 22:38:56 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5ACBEB2066; Wed, 29 Aug 2018 18:37:52 -0400 (EDT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33B7CB2070; Wed, 29 Aug 2018 18:37:52 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.159]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 29 Aug 2018 18:37:52 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 5A7E416C91C9; Wed, 29 Aug 2018 15:38:56 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: 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, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 29/52] rcu: Remove rsp parameter from __call_rcu() and friend Date: Wed, 29 Aug 2018 15:38:31 -0700 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180829223830.GA1800@linux.vnet.ibm.com> References: <20180829223830.GA1800@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18082922-0052-0000-0000-0000032820C6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009636; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01080744; UDB=6.00557498; IPR=6.00860730; MB=3.00023002; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-29 22:39:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082922-0053-0000-0000-00005DE5FB1E Message-Id: <20180829223854.4055-29-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-29_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1807170000 definitions=main-1808290220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There now is only one rcu_state structure in a given build of the Linux kernel, so there is no need to pass it as a parameter to RCU's functions. This commit therefore removes the rsp parameter from __call_rcu_core() and __call_rcu(). Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 715ca506b5cd..4af227e826a6 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2813,8 +2813,8 @@ static void invoke_rcu_core(void) /* * Handle any core-RCU processing required by a call_rcu() invocation. */ -static void __call_rcu_core(struct rcu_state *rsp, struct rcu_data *rdp, - struct rcu_head *head, unsigned long flags) +static void __call_rcu_core(struct rcu_data *rdp, struct rcu_head *head, + unsigned long flags) { /* * If called from an extended quiescent state, invoke the RCU @@ -2846,10 +2846,10 @@ static void __call_rcu_core(struct rcu_state *rsp, struct rcu_data *rdp, } else { /* Give the grace period a kick. */ rdp->blimit = LONG_MAX; - if (rsp->n_force_qs == rdp->n_force_qs_snap && + if (rcu_state.n_force_qs == rdp->n_force_qs_snap && rcu_segcblist_first_pend_cb(&rdp->cblist) != head) force_quiescent_state(); - rdp->n_force_qs_snap = rsp->n_force_qs; + rdp->n_force_qs_snap = rcu_state.n_force_qs; rdp->qlen_last_fqs_check = rcu_segcblist_n_cbs(&rdp->cblist); } } @@ -2869,11 +2869,11 @@ static void rcu_leak_callback(struct rcu_head *rhp) * is expected to specify a CPU. */ static void -__call_rcu(struct rcu_head *head, rcu_callback_t func, - struct rcu_state *rsp, int cpu, bool lazy) +__call_rcu(struct rcu_head *head, rcu_callback_t func, int cpu, bool lazy) { unsigned long flags; struct rcu_data *rdp; + struct rcu_state __maybe_unused *rsp = &rcu_state; /* Misaligned rcu_head! */ WARN_ON_ONCE((unsigned long)head & (sizeof(void *) - 1)); @@ -2931,7 +2931,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func, rcu_segcblist_n_cbs(&rdp->cblist)); /* Go handle any RCU core processing required. */ - __call_rcu_core(rsp, rdp, head, flags); + __call_rcu_core(rdp, head, flags); local_irq_restore(flags); } @@ -2972,7 +2972,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func, */ void call_rcu(struct rcu_head *head, rcu_callback_t func) { - __call_rcu(head, func, &rcu_state, -1, 0); + __call_rcu(head, func, -1, 0); } EXPORT_SYMBOL_GPL(call_rcu); @@ -2999,7 +2999,7 @@ EXPORT_SYMBOL_GPL(call_rcu_sched); void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func) { - __call_rcu(head, func, &rcu_state, -1, 1); + __call_rcu(head, func, -1, 1); } EXPORT_SYMBOL_GPL(kfree_call_rcu); @@ -3271,7 +3271,7 @@ static void _rcu_barrier(struct rcu_state *rsp) smp_mb__before_atomic(); atomic_inc(&rsp->barrier_cpu_count); __call_rcu(&rdp->barrier_head, - rcu_barrier_callback, rsp, cpu, 0); + rcu_barrier_callback, cpu, 0); } } else if (rcu_segcblist_n_cbs(&rdp->cblist)) { _rcu_barrier_trace(rsp, TPS("OnlineQ"), cpu, -- 2.17.1