Received: by 10.223.148.5 with SMTP id 5csp7801341wrq; Thu, 18 Jan 2018 09:40:26 -0800 (PST) X-Google-Smtp-Source: ACJfBotm0etxoG94Kfun952tnvSHOqvxAbnqlvjzgv4xS+TdrewgfHa7wSgJp/jCn7gPYgn9OFkY X-Received: by 10.99.175.76 with SMTP id s12mr37566268pgo.328.1516297226760; Thu, 18 Jan 2018 09:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516297226; cv=none; d=google.com; s=arc-20160816; b=fZmv1HILL3nTFHQqK1SqEvGpf/3G/WT3CklEa4Ms8XiHehpKu9p3WgpVUk9veHdXRE +9Zi1UHp6wjq3wte0flRZXRfOIG7WwLJCQFGrlR0C/zZf7ez20UVUyg5jl9myIvCEU/9 c0wEbjTg0p+L/oQmAIWKlKyQGWauOS84F4xEWVcp5mp9/kdIsGYxAX/FMltx8GZ9ceQn k84spUW6LEWJAMxLrazY0FpZlXvtjhlMPkykZx//OgohR5A05LUDgNSTX4N0soj8MRhi /qSzn0IDo4BZSRMaMG/13U8uTYft8R7LOAicAYVKwMe8uwpb2UgqqJMuWfWxZ22LvjUA 6w2Q== 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=cMcUbaFgq8mVLRf5W5IvQdFwIQweXhIkgiVrLEnKa/E=; b=Saq2iYQpaAvjthA1+fBM68bHpbb626zUM/363aBbNdmMqkE5gsOLFVuStyEVc426+c CxxG+mBFGjiQ5IvlSl9BlkgOFOFmQkG2zLmVxFwFlA/lXmzeIKfejlSS7psWODbcNkrL i0vk0ECv1/GHZbhL8NsAbAv+1UYFsv7bPREJQgt6Qdwhw9XL5pzW7c3mvoHxlo//rVy9 ObF5PHYP89qqO1jYW5kygU/ZrJMqohZSKWQbaM0kGs+9ZEH0iJIEziS2SX/2vI8h9QID EV39xZVallanWERDjlAudZGfvcZmSvqYnc74AnQK0w3OYetAcAr+5oIBg+qisBCZ1Amw b6bA== 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 11-v6si64831plb.496.2018.01.18.09.40.12; Thu, 18 Jan 2018 09:40:26 -0800 (PST) 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 S1755551AbeARRid (ORCPT + 99 others); Thu, 18 Jan 2018 12:38:33 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50644 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755533AbeARRia (ORCPT ); Thu, 18 Jan 2018 12:38:30 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0IHTTqf089598 for ; Thu, 18 Jan 2018 12:38:29 -0500 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fjyrt14xn-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 18 Jan 2018 12:38:29 -0500 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Jan 2018 12:38:28 -0500 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 18 Jan 2018 12:38:26 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0IHcPGx37421220; Thu, 18 Jan 2018 17:38:25 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 764A3B204D; Thu, 18 Jan 2018 12:35:25 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.80.216.177]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 39A2EB2050; Thu, 18 Jan 2018 12:35:25 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 987BE16C2AF4; Thu, 18 Jan 2018 09:38:25 -0800 (PST) Date: Thu, 18 Jan 2018 09:38:25 -0800 From: "Paul E. McKenney" To: "Liu, Changcheng" Cc: Lai Jiangshan , Mathieu Desnoyers , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: refine structure rcu_node field for rcu boost Reply-To: paulmck@linux.vnet.ibm.com References: <20180118103342.GA114176@sofia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118103342.GA114176@sofia> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18011817-0044-0000-0000-000003D17AC2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008402; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000247; SDB=6.00976895; UDB=6.00495259; IPR=6.00756817; BA=6.00005782; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019114; XFM=3.00000015; UTC=2018-01-18 17:38:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011817-0045-0000-0000-00000800DA76 Message-Id: <20180118173825.GG9671@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-18_08:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801180234 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 06:33:43PM +0800, Liu, Changcheng wrote: > Do not allocate space for rcu boost field when > RCU BOOST is not configured. > > Signed-off-by: Liu Changcheng The added #ifdef in rcu_read_unlock_special() is a deal-breaker. Just out of curiosity, is this decrease in storage measurable at the system level? Thanx, Paul > diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h > index 46a5d19..88f087e 100644 > --- a/kernel/rcu/tree.h > +++ b/kernel/rcu/tree.h > @@ -129,6 +129,7 @@ struct rcu_node { > /* if there is no such task. If there */ > /* is no current expedited grace period, */ > /* then there can cannot be any such task. */ > +#ifdef CONFIG_RCU_BOOST > struct list_head *boost_tasks; > /* Pointer to first task that needs to be */ > /* priority boosted, or NULL if no priority */ > @@ -153,6 +154,8 @@ struct rcu_node { > /* Number of tasks boosted for expedited GP. */ > unsigned long n_normal_boosts; > /* Number of tasks boosted for normal GP. */ > +#endif/* #ifdef CONFIG_RCU_BOOST*/ > + > #ifdef CONFIG_RCU_NOCB_CPU > struct swait_queue_head nocb_gp_wq[2]; > /* Place for rcu_nocb_kthread() to wait GP. */ > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h > index db85ca3..fee0b1e 100644 > --- a/kernel/rcu/tree_plugin.h > +++ b/kernel/rcu/tree_plugin.h > @@ -506,8 +506,10 @@ void rcu_read_unlock_special(struct task_struct *t) > if (IS_ENABLED(CONFIG_RCU_BOOST)) { > /* Snapshot ->boost_mtx ownership w/rnp->lock held. */ > drop_boost_mutex = rt_mutex_owner(&rnp->boost_mtx) == t; > +#ifdef CONFIG_RCU_BOOST > if (&t->rcu_node_entry == rnp->boost_tasks) > rnp->boost_tasks = np; > +#endif > } > > /* > -- > 2.7.4 >