lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230302011908.GN2948950@paulmck-ThinkPad-P17-Gen-1>
Date:   Wed, 1 Mar 2023 17:19:08 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Joel Fernandes <joel@...lfernandes.org>
Cc:     Frederic Weisbecker <frederic@...nel.org>,
        Uladzislau Rezki <urezki@...il.com>,
        "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>, linux-kernel@...r.kernel.org,
        Lai Jiangshan <jiangshanlai@...il.com>,
        linux-doc@...r.kernel.org, rcu@...r.kernel.org
Subject: Re: [PATCH RFC v2] rcu: Add a minimum time for marking boot as
 completed

On Wed, Mar 01, 2023 at 08:08:54PM -0500, Joel Fernandes wrote:
> On Wed, Mar 1, 2023 at 7:49 PM Paul E. McKenney <paulmck@...nel.org> wrote:
> >
> > On Wed, Mar 01, 2023 at 04:31:01PM -0500, Joel Fernandes wrote:
> > > On Wed, Mar 1, 2023 at 12:11 PM Frederic Weisbecker <frederic@...nel.org> wrote:
> > > [...]
> > > > > Hmmm I see what you mean, so a conservative and configurable "fail-safe"
> > > > > timeout followed by sysctl to end the boot earlier than the timeout, should
> > > > > do it (something like 30 seconds IMHO sounds reasonable)? In any case,
> > > > > whatever way we go, we would not end the kernel boot before
> > > > > rcu_end_inkernel_boot() is called at least once (which is the current
> > > > > behavior).
> > > > >
> > > > > So it would be:
> > > > >
> > > > >   low level boot + initcalls
> > > > >        20 sec                         30 second timeout
> > > > > |------------------------------|--------------------------
> > > > >                                |                         |
> > > > >               old rcu_end_inkernel_boot()      new rcu_end_inkernel_boot()
> > > > >
> > > > > But it could be, if user decides:
> > > > >   low level boot + initcalls
> > > > >        20 sec                         10 second timeout
> > > > > |------------------------------|--------------------------
> > > > >                                |                         |
> > > > >               old rcu_end_inkernel_boot()      new rcu_end_inkernel_boot()
> > > > >                                                via /sys/ entry.
> > > >
> > > > The problem I have with a random default timeout is that it may break sensitive
> > > > workloads. If the default is 30 and say the boot only takes 5 seconds and
> > > > immediately launches a latency sensitive task, this may break things in a
> > > > subtle way during these 25 seconds when it usually didn't. Because expedited
> > > > RCU is a hammer interrupting all non-idle CPUs.
> > > >
> > > > Until now forcing expedited RCU was only performed before any user code. Now it
> > > > crosses the boundary so better be careful. I'd personally advocate for keeping
> > > > the current call before init is launched. Then provide an end_boot_sysctl kernel
> > > > boot parameter that will ignore the current call before init and let the user
> > > > signal that through sysctl.
> > >
> > > Considering that the PREEMPT-RT system benefits from it within the 8
> > > seconds, I will go ahead make the default 15 seconds or so and make it
> > > tunable. Hopefully that will be an acceptable compromise, with
> > > sufficient documentation, changelog, and so forth... If you agree I'd
> > > appreciate your Ack on the next posting.
> >
> > Just checking on the sysfs portion of this.
> 
> Yes, the current plan is to add a sysfs node (likely sysctl) with the
> 15-second failsafe.

Whew!!!  Very good, then!

> > After all, tuning kernel
> > boot parameters to specific systems is not all that much fun, especially
> > when you have lots of systems.
> 
> Are you suggesting to drop "end the boot" sysfs and just have a
> minimum-time approach as I initially did?

Not at all.  I was just concerned that the sysfs was getting lost in
the shuffle.

All good now, thank you!

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ