From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E . McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
rcu <rcu@vger.kernel.org>, Uladzislau Rezki <urezki@gmail.com>,
Neeraj Upadhyay <quic_neeraju@quicinc.com>,
Joel Fernandes <joel@joelfernandes.org>,
Giovanni Gherdovich <ggherdovich@suse.cz>
Subject: [PATCH 5/9] rcu: Add rcutree.lazy_enabled boot parameter
Date: Wed, 31 May 2023 12:17:32 +0200 [thread overview]
Message-ID: <20230531101736.12981-6-frederic@kernel.org> (raw)
In-Reply-To: <20230531101736.12981-1-frederic@kernel.org>
Allow to overwrite the arbitrary default number of lazy callbacks
threshold that is currently set to 100. This allows for tuning between
powersaving, throughtput and memory consumption expectations. As a
bonus, setting this value to 0 disables lazy callbacks.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
Documentation/admin-guide/kernel-parameters.txt | 5 +++++
kernel/rcu/tree.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 505978cfb548..dd2be4249061 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4798,6 +4798,11 @@
Set threshold of queued RCU callbacks beyond which
batch limiting is disabled.
+ rcutree.qhimark_lazy = [KNL]
+ Set threshold of queued lazy RCU callbacks beyond which
+ batch must be flushed to the main queue. If set to 0,
+ disable lazy queue.
+
rcutree.qlowmark= [KNL]
Set threshold of queued RCU callbacks below which
batch limiting is re-enabled.
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 9b98d87fa22e..e33c0d889216 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -390,6 +390,7 @@ static long qovld_calc = -1; // No pre-initialization lock acquisitions!
module_param(blimit, long, 0444);
module_param(qhimark, long, 0444);
+module_param(qhimark_lazy, long, 0444);
module_param(qlowmark, long, 0444);
module_param(qovld, long, 0444);
@@ -2655,7 +2656,7 @@ __call_rcu_common(struct rcu_head *head, rcu_callback_t func, bool lazy_in)
kasan_record_aux_stack_noalloc(head);
local_irq_save(flags);
rdp = this_cpu_ptr(&rcu_data);
- lazy = lazy_in && !rcu_async_should_hurry();
+ lazy = lazy_in && qhimark_lazy && !rcu_async_should_hurry();
/* Add the callback to our list. */
if (unlikely(!rcu_segcblist_is_enabled(&rdp->cblist))) {
--
2.40.1
next prev parent reply other threads:[~2023-05-31 10:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 10:17 [PATCH 0/9] rcu: Support for lazy callbacks on !CONFIG_RCU_NOCB_CPU Frederic Weisbecker
2023-05-31 10:17 ` [PATCH 1/9] rcu: Assume IRQS disabled from rcu_report_dead() Frederic Weisbecker
2023-06-02 22:51 ` Joel Fernandes
2023-05-31 10:17 ` [PATCH 2/9] rcu: Use rcu_segcblist_segempty() instead of open coding it Frederic Weisbecker
2023-06-02 23:00 ` Joel Fernandes
2023-07-05 12:21 ` Frederic Weisbecker
2023-06-13 8:44 ` Zhuo, Qiuxu
2023-05-31 10:17 ` [PATCH 3/9] rcu: Rename jiffies_till_flush to jiffies_lazy_flush Frederic Weisbecker
2023-06-01 17:15 ` kernel test robot
2023-06-01 17:15 ` kernel test robot
2023-06-01 22:40 ` kernel test robot
2023-05-31 10:17 ` [PATCH 4/9] rcu: Introduce lazy queue's own qhimark Frederic Weisbecker
2023-06-03 1:23 ` Joel Fernandes
2023-07-05 12:45 ` Frederic Weisbecker
2023-05-31 10:17 ` Frederic Weisbecker [this message]
2023-06-13 6:57 ` [PATCH 5/9] rcu: Add rcutree.lazy_enabled boot parameter Zhuo, Qiuxu
2023-07-05 12:42 ` Frederic Weisbecker
2023-05-31 10:17 ` [PATCH 6/9] rcu/nocb: Rename was_alldone to was_pending Frederic Weisbecker
2023-05-31 10:17 ` [PATCH 7/9] rcu: Implement lazyness on the main segcblist level Frederic Weisbecker
2023-05-31 10:17 ` [PATCH 8/9] rcu: Make segcblist flags test strict Frederic Weisbecker
2023-05-31 10:17 ` [PATCH 9/9] rcu: Support lazy callbacks with CONFIG_RCU_NOCB_CPU=n Frederic Weisbecker
2023-07-05 12:41 ` [PATCH 0/9] rcu: Support for lazy callbacks on !CONFIG_RCU_NOCB_CPU Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230531101736.12981-6-frederic@kernel.org \
--to=frederic@kernel.org \
--cc=ggherdovich@suse.cz \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=quic_neeraju@quicinc.com \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.