From: Joel Fernandes <joel@joelfernandes.org>
To: "Paul E. McKenney" <paulmck@kernel.org>, rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org
Subject: Re: [PATCH rcu 5/6] rcu: Make the rcu_nocb_poll boot parameter usable via boot config
Date: Tue, 18 Jul 2023 09:46:24 -0400 [thread overview]
Message-ID: <3586af97-e9bc-341f-4a81-678b5e1e96f8@joelfernandes.org> (raw)
In-Reply-To: <20230717180317.1097590-5-paulmck@kernel.org>
On 7/17/23 14:03, Paul E. McKenney wrote:
> The rcu_nocb_poll kernel boot parameter is defined via early_param(),
> whose parsing functions are invoked from parse_early_param() which
> is in turn invoked by setup_arch(), which is very early indeed. It
> is invoked so early that the console output timestamps read 0.000000,
> in other words, before time begins.
>
> This use of early_param() means that the rcu_nocb_poll kernel boot
> parameter cannot usefully be embedded into the kernel image. Yes, you
> can embed it, but setup_boot_config() is invoked from start_kernel()
> too late for it to be parsed.
>
> But it makes no sense to parse this parameter so early. After all,
> it cannot do anything until the rcuog kthreads are created, which is
> long after rcu_init() time, let alone setup_boot_config() time. >
> This commit therefore switches the rcu_nocb_poll kernel boot parameter
> from early_param() to __setup(), which allows boot-config parsing of
> this parameter, in turn allowing it to be embedded into the kernel image.
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> kernel/rcu/tree_nocb.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> index 43229d2b0c44..5598212d1f27 100644
> --- a/kernel/rcu/tree_nocb.h
> +++ b/kernel/rcu/tree_nocb.h
> @@ -77,9 +77,9 @@ __setup("rcu_nocbs", rcu_nocb_setup);
> static int __init parse_rcu_nocb_poll(char *arg)
> {
> rcu_nocb_poll = true;
> - return 0;
> + return 1;
> }
> -early_param("rcu_nocb_poll", parse_rcu_nocb_poll);
> +__setup("rcu_nocb_poll", parse_rcu_nocb_poll);
I was trying to see if core_param() could be used. But I am not sure if the RCU
offload threads are spawned too early for that.
I am Ok with it:
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
thanks,
-Joel
> /*
> * Don't bother bypassing ->cblist if the call_rcu() rate is low.
next prev parent reply other threads:[~2023-07-18 13:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 18:03 [PATCH rcu 0/6] Miscellaneous fixes for v6.6 Paul E. McKenney
2023-07-17 18:03 ` [PATCH rcu 1/6] rcu: Update synchronize_rcu_mult() comment for call_rcu_hurry() Paul E. McKenney
2023-07-18 12:59 ` Joel Fernandes
2023-07-17 18:03 ` [PATCH rcu 2/6] rcu: Clarify rcu_is_watching() kernel-doc comment Paul E. McKenney
2023-07-18 12:52 ` Joel Fernandes
2023-07-18 18:12 ` Paul E. McKenney
2023-07-19 1:56 ` Joel Fernandes
2023-07-19 20:38 ` Paul E. McKenney
2023-07-17 18:03 ` [PATCH rcu 3/6] srcu,notifier: Remove #ifdefs in favor of SRCU Tiny srcu_usage Paul E. McKenney
2023-07-17 18:09 ` Linus Torvalds
2023-07-17 18:16 ` Paul E. McKenney
2023-07-17 18:03 ` [PATCH rcu 4/6] rcu: Mark __rcu_irq_enter_check_tick() ->rcu_urgent_qs load Paul E. McKenney
2023-07-18 12:58 ` Joel Fernandes
2023-07-17 18:03 ` [PATCH rcu 5/6] rcu: Make the rcu_nocb_poll boot parameter usable via boot config Paul E. McKenney
2023-07-18 13:46 ` Joel Fernandes [this message]
2023-07-17 18:03 ` [PATCH rcu 6/6] rcu: Use WRITE_ONCE() for assignments to ->next for rculist_nulls Paul E. McKenney
2023-07-18 13:49 ` Joel Fernandes
2023-07-18 14:48 ` Alan Huang
2023-07-18 18:32 ` Paul E. McKenney
2023-07-19 1:48 ` Joel Fernandes
2023-07-19 18:20 ` Paul E. McKenney
2023-07-19 19:17 ` Alan Huang
2023-07-19 20:02 ` Paul E. McKenney
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=3586af97-e9bc-341f-4a81-678b5e1e96f8@joelfernandes.org \
--to=joel@joelfernandes.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®