Received: by 10.192.165.148 with SMTP id m20csp2931772imm; Sun, 22 Apr 2018 19:38:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/FzSGkjrdOlClVPTuGexjiX7Zz/G095O7a8uSiRB2Ljl3uTXv0Dlk/CmMedfvI7G72cDtr X-Received: by 10.98.178.208 with SMTP id z77mr18170265pfl.122.1524451120883; Sun, 22 Apr 2018 19:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524451120; cv=none; d=google.com; s=arc-20160816; b=x0VdqsuFn5mVGMZtYTEfOwrqeGZo3lU6ie6oFnM9iDtgr+dIHLRbcvT3/WA99LcnHq kWv7lWLhPyVV0Vo7LS+fJiLguAmFVV8X5Ehgh1cocI2NtTqaDz9+59cssjNh2LxsGFbf NnInCvcZ/AOISNh6n8pBoLpsBZ1evsoCVnSp9guaaGgEDh8oWi8ClsAc9HlHta1iJJI2 h9lQUhLTb+cR/c1cgtiu2ohU36MOzu3fUXHbrZzkBsocXYEt5EcoXastw1eZIFVZS0YQ X0pXlR2MxjWp3YobxSv6llDUg1XqgiMqRiqC6XZgMkvd9K6+aD0bbq8R46ri2bXdyGgG L/5A== 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=iXsicAN2V+kxJgxXQt+OK9AUl/A8l9JWSF8ANe0Gnpc=; b=GgsXaDOxHsvcPgJ73QWB+35PXJ8zK710nvjx6M/sOdbsKS2FLO8/seJJjie+ebmQ1W O/z8hEdQFY4uwuEmzoKgpGU3D+5UU5dwp09gyJXTpZ8Cge9w7FZEo/ei3zUQ9W7Gaf1S zCtRiSP5uEx83osRIECrsOliD47UUPG8Bt/3pMflDhQrNcR6lSwbKNIv08Jtbbx4xBlL ebWbd8DvzdnaWxU6eEUoDqLjCytv3yWLL2K/5Tc/Kd8jnovJuHM5CEsU7fwaIWnRvl89 rdo+nXtbj+l5I/pV/MzbvfmesTSf/6t4WrTk/ZAROnr8xtxOnpNQft8JeJfm9V7cuoR4 jLMw== 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 g11si8911853pgn.368.2018.04.22.19.38.26; Sun, 22 Apr 2018 19:38:40 -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 S1754295AbeDWCfg (ORCPT + 99 others); Sun, 22 Apr 2018 22:35:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59630 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753929AbeDWCbV (ORCPT ); Sun, 22 Apr 2018 22:31:21 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3N2T2BY054690 for ; Sun, 22 Apr 2018 22:31:21 -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 2hh3w5csh7-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Sun, 22 Apr 2018 22:31:20 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 22 Apr 2018 22:31:19 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 22 Apr 2018 22:31:15 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3N2VETA53805308; Mon, 23 Apr 2018 02:31:14 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADD78B204D; Sun, 22 Apr 2018 23:33:17 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.149.45]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 7197CB2046; Sun, 22 Apr 2018 23:33:17 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 6C2C216C8776; Sun, 22 Apr 2018 19:32:28 -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.opensrc@gmail.com, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 03/22] rcu: Don't allocate rcu_nocb_mask if no one needs it Date: Sun, 22 Apr 2018 19:32:08 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20180423023150.GA21533@linux.vnet.ibm.com> References: <20180423023150.GA21533@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042302-0052-0000-0000-000002E0B1C0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008903; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01021888; UDB=6.00521536; IPR=6.00801123; MB=3.00020719; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-23 02:31:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042302-0053-0000-0000-00005C6D822B Message-Id: <1524450747-22778-3-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-23_01:,, 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804230025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 44c65ff2e3b0 ("rcu: Eliminate NOCBs CPU-state Kconfig options") made allocation of rcu_nocb_mask depend only on the rcu_nocbs=, nohz_full=, or isolcpus= kernel boot parameters. However, it failed to change the initial value of rcu_init_nohz()'s local variable need_rcu_nocb_mask to false, which can result in useless allocation of an all-zero rcu_nocb_mask. This commit therefore fixes this bug by changing the initial value of need_rcu_nocb_mask to false. While we are in the area, also correct the error message that is printed when someone specifies that can-never-exist CPUs should be NOCBs CPUs. Reported-by: Byungchul Park Signed-off-by: Paul E. McKenney Acked-by: Byungchul Park --- kernel/rcu/tree_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 6c5df18bbf2f..3566e4f6dfcc 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2283,7 +2283,7 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp) void __init rcu_init_nohz(void) { int cpu; - bool need_rcu_nocb_mask = true; + bool need_rcu_nocb_mask = false; struct rcu_state *rsp; #if defined(CONFIG_NO_HZ_FULL) @@ -2306,7 +2306,7 @@ void __init rcu_init_nohz(void) #endif /* #if defined(CONFIG_NO_HZ_FULL) */ if (!cpumask_subset(rcu_nocb_mask, cpu_possible_mask)) { - pr_info("\tNote: kernel parameter 'rcu_nocbs=' contains nonexistent CPUs.\n"); + pr_info("\tNote: kernel parameter 'rcu_nocbs=', 'nohz_full', or 'isolcpus=' contains nonexistent CPUs.\n"); cpumask_and(rcu_nocb_mask, cpu_possible_mask, rcu_nocb_mask); } -- 2.5.2