All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: paulmck@kernel.org, "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <frederic@kernel.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-doc@vger.kernel.org, rcu@vger.kernel.org
Subject: Re: [PATCH RFC v2] rcu: Add a minimum time for marking boot as completed
Date: Mon, 27 Feb 2023 19:06:06 +0100	[thread overview]
Message-ID: <Y/zxDuxsihJXTdxf@pc636> (raw)
In-Reply-To: <CAEXW_YSVm7fjJaX=AT-Yg70wXL-_1RxoVPfzN8M8zJAkc0um3g@mail.gmail.com>

On Mon, Feb 27, 2023 at 10:16:51AM -0500, Joel Fernandes wrote:
> On Mon, Feb 27, 2023 at 9:55 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > On Mon, Feb 27, 2023 at 08:22:06AM -0500, Joel Fernandes wrote:
> > >
> > >
> > > > On Feb 27, 2023, at 2:53 AM, Zhuo, Qiuxu <qiuxu.zhuo@intel.com> wrote:
> > > >
> > > > 
> > > >>
> > > >> From: Joel Fernandes (Google) <joel@joelfernandes.org>
> > > >> Sent: Saturday, February 25, 2023 11:34 AM
> > > >> To: linux-kernel@vger.kernel.org
> > > >> Cc: Joel Fernandes (Google) <joel@joelfernandes.org>; Frederic Weisbecker
> > > >> <frederic@kernel.org>; Lai Jiangshan <jiangshanlai@gmail.com>; linux-
> > > >> doc@vger.kernel.org; Paul E. McKenney <paulmck@kernel.org>;
> > > >> rcu@vger.kernel.org
> > > >> Subject: [PATCH RFC v2] rcu: Add a minimum time for marking boot as
> > > >> completed
> > > >>
> > > >> On many systems, a great deal of boot happens after the kernel thinks the
> > > >> boot has completed. It is difficult to determine if the system has really
> > > >> booted from the kernel side. Some features like lazy-RCU can risk slowing
> > > >> down boot time if, say, a callback has been added that the boot
> > > >> synchronously depends on.
> > > >>
> > > >> Further, it is better to boot systems which pass 'rcu_normal_after_boot' to
> > > >> stay expedited for as long as the system is still booting.
> > > >>
> > > >> For these reasons, this commit adds a config option
> > > >> 'CONFIG_RCU_BOOT_END_DELAY' and a boot parameter
> > > >> rcupdate.boot_end_delay.
> > > >>
> > > >> By default, this value is 20s. A system designer can choose to specify a value
> > > >> here to keep RCU from marking boot completion.  The boot sequence will not
> > > >> be marked ended until at least boot_end_delay milliseconds have passed.
> > > >
> > > > Hi Joel,
> > > >
> > > > Just some thoughts on the default value of 20s, correct me if I'm wrong :-).
> > > >
> > > > Does the OS with CONFIG_PREEMPT_RT=y kernel concern more about the
> > > > real-time latency than the overall OS boot time?
> > >
> > > But every system has to boot, even an RT system.
> > >
> > > >
> > > > If so, we might make rcupdate.boot_end_delay = 0 as the default value
> > > > (NOT the default 20s) for CONFIG_PREEMPT_RT=y kernels?
> > >
> > > Could you measure how much time your RT system takes to boot before the application runs?
> > >
> > > I can change it to default 0 essentially NOOPing it, but I would rather have a saner default (10 seconds even), than having someone forget to tune this for their system.
> >
> > Provide a /sys location that the userspace code writes to when it
> > is ready?  Different systems with different hardware and software
> > configurations are going to take different amounts of time to boot,
> > correct?
> 
> I could add a sysfs node, but I still wanted this patch as well
> because I am wary of systems where yet more userspace changes are
> required. I feel the kernel should itself be able to do this. Yes, it
> is possible the system completes "booting" at a different time than
> what the kernel thinks. But it does that anyway (even without this
> patch), so I am not seeing a good reason to not do this in the kernel.
> It is also only a minimum cap, so if the in-kernel boot takes too
> long, then the patch will have no effect.
> 
> Thoughts?
> 
Why "rcu_boot_ended" is not enough? As i see right after that an "init"
process or shell or panic is going to be invoked by the kernel. It basically
indicates that a kernel is fully functional.

Or an idea to wait even further? Until all kernel modules are loaded by
user space.

Thanks!

--
Uladzislau Rezki

  reply	other threads:[~2023-02-27 18:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25  3:34 [PATCH RFC v2] rcu: Add a minimum time for marking boot as completed Joel Fernandes (Google)
2023-02-25  3:36 ` Randy Dunlap
2023-02-25 11:55 ` kernel test robot
2023-02-26 19:45 ` Frederic Weisbecker
2023-02-26 23:07   ` Joel Fernandes
2023-02-27  7:53 ` Zhuo, Qiuxu
2023-02-27 13:22   ` Joel Fernandes
2023-02-27 14:55     ` Paul E. McKenney
2023-02-27 15:16       ` Joel Fernandes
2023-02-27 18:06         ` Uladzislau Rezki [this message]
2023-02-27 18:15           ` Joel Fernandes
2023-02-27 18:20             ` Uladzislau Rezki
2023-02-27 18:27               ` Joel Fernandes
2023-02-27 18:57                 ` Uladzislau Rezki
2023-02-27 19:10                   ` Joel Fernandes
2023-02-27 23:05                     ` Paul E. McKenney
2023-02-27 23:24                       ` Joel Fernandes
2023-02-27 23:40                       ` Frederic Weisbecker
2023-02-28  1:30                         ` Joel Fernandes
2023-02-28 11:04                           ` Frederic Weisbecker
2023-02-28 20:09                             ` Joel Fernandes
2023-03-01 17:11                               ` Frederic Weisbecker
2023-03-01 21:31                                 ` Joel Fernandes
2023-03-02  0:49                                   ` Paul E. McKenney
2023-03-02  1:08                                     ` Joel Fernandes
2023-03-02  1:19                                       ` Paul E. McKenney
2023-02-28 11:42                     ` Uladzislau Rezki
2023-02-28  6:40     ` Zhuo, Qiuxu
2023-02-28 14:27       ` Joel Fernandes
2023-03-01  1:34         ` Zhuo, Qiuxu
2023-03-01 15:57           ` Joel Fernandes

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=Y/zxDuxsihJXTdxf@pc636 \
    --to=urezki@gmail.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=rcu@vger.kernel.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 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.