From: Uladzislau Rezki <urezki@gmail.com>
To: "Zhang, Qiang1" <qiang1.zhang@intel.com>
Cc: "Zhang, Qiang1" <qiang1.zhang@intel.com>,
paulmck@kernel.org, Neeraj Upadhyay <quic_neeraju@quicinc.com>,
"frederic@kernel.org" <frederic@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
rcu@vger.kernel.org, bigeasy@linutronix.de
Subject: Re: [PATCH] rcu: Only boost rcu reader tasks with lower priority than boost kthreads
Date: Tue, 8 Mar 2022 19:04:21 +0100 [thread overview]
Message-ID: <YieapfzKvy2chaHT@pc638.lan> (raw)
In-Reply-To: <20220307191512.GN4285@paulmck-ThinkPad-P17-Gen-1>
> 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@intel.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.
Thanks!
--
Vlad Rezki
next prev parent reply other threads:[~2022-03-08 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 9:26 [PATCH] rcu: Only boost rcu reader tasks with lower priority than boost kthreads Zqiang
2022-03-04 11:42 ` Neeraj Upadhyay
2022-03-07 2:03 ` Zhang, Qiang1
2022-03-07 19:15 ` Paul E. McKenney
2022-03-08 18:04 ` Uladzislau Rezki [this message]
2022-03-08 18:13 ` Paul E. McKenney
2022-03-08 18:25 ` Uladzislau Rezki
2022-03-09 3:04 ` Zhang, Qiang1
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=YieapfzKvy2chaHT@pc638.lan \
--to=urezki@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang1.zhang@intel.com \
--cc=quic_neeraju@quicinc.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.