From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D17EC433E7 for ; Fri, 9 Oct 2020 06:38:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 047CF22251 for ; Fri, 9 Oct 2020 06:38:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3cWJHKak"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pQaZusIF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731648AbgJIGiU (ORCPT ); Fri, 9 Oct 2020 02:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731937AbgJIGf0 (ORCPT ); Fri, 9 Oct 2020 02:35:26 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A50FC0613DB; Thu, 8 Oct 2020 23:35:25 -0700 (PDT) Date: Fri, 09 Oct 2020 06:35:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602225324; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9A2Qj4e5LNnQd1bHY/ymov1oqwXcDB9VLQrsElYBy4=; b=3cWJHKakabzM5yGNHWGgbwCUBg6Asi/hJm/m8/pf+In5OgA4n19DfjOCOM+YtMwzOnQ0dO jQL+epEOJGK/AH+cKCoquWK7ScFsFYmt1Pha83xI0bGwmBtK7d22aNhZDT5AoHJ2LuyxL5 hYjuVjrR/ONwXYcVg1n6wGwcurHVyyVFaeVPjqDIXdacLcxaZeYHsFxeNDkDSffk2irgXZ 7RcBkSYmBNxE9POUKYz8aHaffLwcoVLcP+5ZeS1Eru+xfTxr8quQce9qDvX9As0zLnZ1qu A/dIFzhRalQhPeIUU2iU1u1QTHtzXW4K7YRJGclca6p4sm8diuSy0LhCcMgzHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602225324; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a9A2Qj4e5LNnQd1bHY/ymov1oqwXcDB9VLQrsElYBy4=; b=pQaZusIFvtgG7J2IsojWES8y0yeeNz9Y3j12oHtdi14dnhaG7UwWFvqHG8c449jLIkXZP3 qH7MWdmgT2qa8HCg== From: "tip-bot2 for Paul E. McKenney" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/rcu] rcu: Reduce leaf fanout for strict RCU grace periods Cc: "Paul E. McKenney" , x86 , LKML MIME-Version: 1.0 Message-ID: <160222532326.7002.17818852493729855728.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the core/rcu branch of tip: Commit-ID: dc1269186bed3afc5a2018527516be84fe55d3e0 Gitweb: https://git.kernel.org/tip/dc1269186bed3afc5a2018527516be84fe55d3e0 Author: Paul E. McKenney AuthorDate: Wed, 05 Aug 2020 16:52:17 -07:00 Committer: Paul E. McKenney CommitterDate: Mon, 24 Aug 2020 18:40:23 -07:00 rcu: Reduce leaf fanout for strict RCU grace periods Because strict RCU grace periods will complete more quickly, they will experience greater lock contention on each leaf rcu_node structure's ->lock. This commit therefore reduces the leaf fanout in order to reduce this lock contention. Note that this also has the effect of reducing the number of CPUs supported to 16 in the case of CONFIG_RCU_FANOUT_LEAF=2 or 81 in the case of CONFIG_RCU_FANOUT_LEAF=3. However, greater numbers of CPUs are probably a bad idea when using CONFIG_RCU_STRICT_GRACE_PERIOD=y. Those wishing to live dangerously are free to edit their kernel/rcu/Kconfig files accordingly. Reported-by Jann Horn Signed-off-by: Paul E. McKenney --- kernel/rcu/Kconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index 0ebe15a..b71e21f 100644 --- a/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig @@ -135,10 +135,12 @@ config RCU_FANOUT config RCU_FANOUT_LEAF int "Tree-based hierarchical RCU leaf-level fanout value" - range 2 64 if 64BIT - range 2 32 if !64BIT + range 2 64 if 64BIT && !RCU_STRICT_GRACE_PERIOD + range 2 32 if !64BIT && !RCU_STRICT_GRACE_PERIOD + range 2 3 if RCU_STRICT_GRACE_PERIOD depends on TREE_RCU && RCU_EXPERT - default 16 + default 16 if !RCU_STRICT_GRACE_PERIOD + default 2 if RCU_STRICT_GRACE_PERIOD help This option controls the leaf-level fanout of hierarchical implementations of RCU, and allows trading off cache misses