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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Mar 2022 10:13:55 -0800
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Uladzislau Rezki <urezki@...il.com>
Cc:     "Zhang, Qiang1" <qiang1.zhang@...el.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        "frederic@...nel.org" <frederic@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        rcu@...r.kernel.org, bigeasy@...utronix.de, juri.lelli@...hat.com
Subject: Re: [PATCH] rcu: Only boost rcu reader tasks with lower priority
 than boost kthreads

On Tue, Mar 08, 2022 at 07:04:21PM +0100, Uladzislau Rezki wrote:
> > On Mon, Mar 07, 2022 at 02:03:17AM +0000, Zhang, Qiang1 wrote:
> > > On 3/4/2022 2:56 PM, Zqiang wrote:
> > > > When RCU_BOOST is enabled, the boost kthreads will boosting readers
> > > > who are blocking a given grace period, if the current reader tasks
> > > > have a higher priority than boost kthreads(the boost kthreads priority
> > > > not always 1, if the kthread_prio is set), boosting is useless, skip
> > > > current task and select next task to boosting, reduce the time for a
> > > > given grace period.
> > > > 
> > > > Signed-off-by: Zqiang <qiang1.zhang@...el.com>
> > 
> > Adding to CC to get more eyes on this.  I am not necessarily opposed to
> > it, but I don't do that much RT work myself these days.
> > 
> > 							Thanx, Paul
> > 
> > > > ---
> > > >   kernel/rcu/tree_plugin.h | 10 +++++++++-
> > > >   1 file changed, 9 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> > > > index c3d212bc5338..d35b6da66bbd 100644
> > > > --- a/kernel/rcu/tree_plugin.h
> > > > +++ b/kernel/rcu/tree_plugin.h
> > > > @@ -12,6 +12,7 @@
> > > >    */
> > > >   
> > > >   #include "../locking/rtmutex_common.h"
> > > > +#include <linux/sched/deadline.h>
> > > >   
> > > >   static bool rcu_rdp_is_offloaded(struct rcu_data *rdp)
> > > >   {
> > > > @@ -1065,13 +1066,20 @@ static int rcu_boost(struct rcu_node *rnp)
> > > >   	 * section.
> > > >   	 */
> > > >   	t = container_of(tb, struct task_struct, rcu_node_entry);
> > > > +	if (!rnp->exp_tasks && (dl_task(t) || t->prio <= current->prio)) {
> > > > +		tb = rcu_next_node_entry(t, rnp);
> > > > +		WRITE_ONCE(rnp->boost_tasks, tb);
> > > > +		raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
> > > > +		goto end;
> > > > +	}
> > > > +
> Why do you bypass the expedited grace period and boost any tasks anyway?
> Same way the expedited gp can be blocked by higher prior tasks SCHED_DEADLINE
> or SCHED_FIFO.

Just to make sure that I understand...

Are you pointing out that a SCHED_DEADLINE task might have exhausted
its budget, so that boosting might nonetheless be helpful?

Me, I honestly don't know what happens in that case, so I am just asking
the question.  And adding Juri on CC.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ