From patchwork Mon Jun 20 22:17:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12888320 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A23E2C43334 for ; Mon, 20 Jun 2022 22:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243856AbiFTWSE (ORCPT ); Mon, 20 Jun 2022 18:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242006AbiFTWSD (ORCPT ); Mon, 20 Jun 2022 18:18:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F6AFE0BC; Mon, 20 Jun 2022 15:18:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8213DB81647; Mon, 20 Jun 2022 22:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 329C0C341C4; Mon, 20 Jun 2022 22:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655763479; bh=3IjzAH3IU8DX6ygvyChO/By+o8Dkf/HjE2ORydBJA9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IepZHb3VEz6sSDFyoWiQK4YBMsGDaaD2jmlkmWB7TLDO/OwCiUKoYLc/V6C/W003L Xy+9KSuRMzKosvOeE/ZtJSdklxoYdC54DEhBdVd4DqgFZz2a6zypgbEAsOEBHGq+ph m2OruJi6xwWTMqleGxyKQjlWBmalYc1Ap8lcIkgC5HRSZ/TKpXmApwm82h8n/pkShb 9MJUCUYdTMk77oWe3NxXw/3Ua/ikTJKYu1TCvi6sbEOWnRNwTeFIkbptN5DEnsb6La M+3OXiyy3nUXb46YV5MdyoDj74dHl4uQ4n17qb5neQkyrcdTqPaKzQZyeGN//KHGUZ a0qvssxpsoQ3Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D41F45C05B9; Mon, 20 Jun 2022 15:17:58 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 1/3] rcutorture: Update rcutorture.fwd_progress help text Date: Mon, 20 Jun 2022 15:17:55 -0700 Message-Id: <20220620221757.3839212-1-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> References: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org This commit updates the rcutorture.fwd_progress help text to say that it is the number of forward-progress kthreads to spawn rather than the old enable/disable functionality. While in the area, make the list of torture-test parameters easier to read by taking advantage of 100 columns. Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay --- kernel/rcu/rcutorture.c | 53 ++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 7120165a93426..6f47d1490c4f5 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -75,62 +75,45 @@ MODULE_AUTHOR("Paul E. McKenney and Josh Triplett X-Patchwork-Id: 12888319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 676E2C433EF for ; Mon, 20 Jun 2022 22:18:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241736AbiFTWSD (ORCPT ); Mon, 20 Jun 2022 18:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbiFTWSC (ORCPT ); Mon, 20 Jun 2022 18:18:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11470DF33; Mon, 20 Jun 2022 15:18:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 863A7B81649; Mon, 20 Jun 2022 22:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DF85C3411B; Mon, 20 Jun 2022 22:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655763479; bh=04DJ1/1K8PMW4hsTpIKiSFs2fsEYB7ypcGETpqL6l6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yh6XneSOsTIuYKGdQ++TLQCmIn/BYK6nrobeOl1jgzTzwLrNcoUTpNZyzzbqap/kk O6o9WifBkPji0iir0MewLIADsuAvXjU8dJHxSg4xRx7h35cTfb7hMvYFVuBQV/ApYm 9dplx2KQdUgDdlUWMRxMtURVmL5pIa+Bz8/901zV7eyzfkfuGAeZdeZPeRjRMMHIQ7 17NvNC7wmIfgcKE6le7c2Vs8ZVEqLkv/2+FKpujPGaFlg79vlvA5VTciC+2/Dfo+TN 9WrXTtrEUiGETQC+ENn6p/ta0FCdqiR9ZYYdsiPd3WFhwFp7VIw3VonQB+m+e7OIOh qNtg3SAs6bO9A== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D834A5C05C8; Mon, 20 Jun 2022 15:17:58 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, "Paul E. McKenney" , Eric Dumazet Subject: [PATCH rcu 2/3] doc: Document the rcutree.rcu_divisor kernel boot parameter Date: Mon, 20 Jun 2022 15:17:56 -0700 Message-Id: <20220620221757.3839212-2-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> References: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org This commit adds kernel-parameters.txt documentation for the rcutree.rcu_divisor kernel boot parameter, which controls the softirq callback-invocation batch limit. Cc: Eric Dumazet Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay --- Documentation/admin-guide/kernel-parameters.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 2522b11e593f2..bdf431bdbfdc4 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4666,6 +4666,21 @@ When RCU_NOCB_CPU is set, also adjust the priority of NOCB callback kthreads. + rcutree.rcu_divisor= [KNL] + Set the shift-right count to use to compute + the callback-invocation batch limit bl from + the number of callbacks queued on this CPU. + The result will be bounded below by the value of + the rcutree.blimit kernel parameter. Every bl + callbacks, the softirq handler will exit in + order to allow the CPU to do other work. + + Please note that this callback-invocation batch + limit applies only to non-offloaded callback + invocation. Offloaded callbacks are instead + invoked in the context of an rcuoc kthread, which + scheduler will preempt as it does any other task. + rcutree.rcu_nocb_gp_stride= [KNL] Set the number of NOCB callback kthreads in each group, which defaults to the square root From patchwork Mon Jun 20 22:17:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12888321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 118D2C433EF for ; Mon, 20 Jun 2022 22:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244018AbiFTWSF (ORCPT ); Mon, 20 Jun 2022 18:18:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241907AbiFTWSD (ORCPT ); Mon, 20 Jun 2022 18:18:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22DAB10FCE; Mon, 20 Jun 2022 15:18:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 83111B81648; Mon, 20 Jun 2022 22:18:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35772C341C5; Mon, 20 Jun 2022 22:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655763479; bh=TnT5Hnafq9jyhnw4TzUBgKnKEH4dMuHcHnyemvZrAqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VgAc8BTGyhyMrzWYbRRbvhA0BsOU9zKLGqtyj5mnZPSwwp/U/uN8FprNP33TUYZev eiASH0aIC/XbcztAmk1qFBv+OsiK8x6DAnzZPKt5NFPoohP1sv46j6+PqC4F4pv4yi Ixir82ZRgruDOHRiiNmbPa29g5LupNaV4HaeOVmzFkpWHWZeoTefJKb7kQRcUapNMo fYBw0cqiB9/UBkCMHUkk2O3ewheCsly5Til+PMstjYJC+TIQ2KQ9n7wE23xBhdg34i KLHxONwIAO1iCQ8paSNobtAhg7DBkHmhRDGfBEBTpfshVP6BZoeunNsPpm3749LA6y vJhiuVa89AZLw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id DA37B5C0A15; Mon, 20 Jun 2022 15:17:58 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, "Paul E. McKenney" , Frederic Weisbecker , Uladzislau Rezki Subject: [PATCH rcu 3/3] doc: Document rcutree.nocb_nobypass_lim_per_jiffy kernel parameter Date: Mon, 20 Jun 2022 15:17:57 -0700 Message-Id: <20220620221757.3839212-3-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> References: <20220620221733.GA3839136@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org This commit provides documentation for the kernel parameter controlling RCU's handling of callback floods on offloaded (rcu_nocbs) CPUs. This parameter might be obscure, but it is always there when you need it. Reported-by: Frederic Weisbecker Reported-by: Uladzislau Rezki Signed-off-by: Paul E. McKenney Reviewed-by: Neeraj Upadhyay --- Documentation/admin-guide/kernel-parameters.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index bdf431bdbfdc4..a30890141b1a5 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4681,6 +4681,19 @@ invoked in the context of an rcuoc kthread, which scheduler will preempt as it does any other task. + rcutree.nocb_nobypass_lim_per_jiffy= [KNL] + On callback-offloaded (rcu_nocbs) CPUs, + RCU reduces the lock contention that would + otherwise be caused callback floods through + use of the ->nocb_bypass list. However, in the + common non-flooded case, RCU queues directly to + the main ->cblist in order to avoid the extra + overhead of the ->nocb_bypass list and its lock. + But if there are too many callbacks queued during + a single jiffy, RCU pre-queues the callbacks into + the ->nocb_bypass queue. The definition of "too + many" is supplied by this kernel boot parameter. + rcutree.rcu_nocb_gp_stride= [KNL] Set the number of NOCB callback kthreads in each group, which defaults to the square root