* Re: [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state
[not found] <tip-f79c3ad6189624c3de0ad5521610c9e22a1c33cf@git.kernel.org>
@ 2017-10-24 10:59 ` Michal Hocko
2017-10-24 15:52 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2017-10-24 10:59 UTC (permalink / raw)
To: linux-kernel, peterz, tglx, mingo, hpa, paulmck; +Cc: linux-tip-commits
On Tue 24-10-17 03:02:09, tip-bot for Paul E. McKenney wrote:
> Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800
> Committer: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> CommitDate: Mon, 9 Oct 2017 14:25:17 -0700
>
> sched,rcu: Make cond_resched() provide RCU quiescent state
>
> There is some confusion as to which of cond_resched() or
> cond_resched_rcu_qs() should be added to long in-kernel loops.
> This commit therefore eliminates the decision by adding RCU quiescent
> states to cond_resched(). This commit also simplifies the code that
> used to interact with cond_resched_rcu_qs(), and that now interacts with
> cond_resched(), to reduce its overhead. This reduction is necessary to
> allow the heavier-weight cond_resched_rcu_qs() mechanism to be invoked
> everywhere that cond_resched() is invoked.
>
> Part of that reduction in overhead converts the jiffies_till_sched_qs
> kernel parameter to read-only at runtime, thus eliminating the need for
> bounds checking.
Thanks a lot Paul! I have just one question. Does the above mean that we
can drop cond_resched_rcu_qs? Or there are still some scenarios when
this is a better option?
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state
2017-10-24 10:59 ` [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state Michal Hocko
@ 2017-10-24 15:52 ` Paul E. McKenney
2017-10-24 16:34 ` Michal Hocko
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2017-10-24 15:52 UTC (permalink / raw)
To: Michal Hocko; +Cc: linux-kernel, peterz, tglx, mingo, hpa, linux-tip-commits
On Tue, Oct 24, 2017 at 12:59:03PM +0200, Michal Hocko wrote:
> On Tue 24-10-17 03:02:09, tip-bot for Paul E. McKenney wrote:
> > Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> > Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> > Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800
> > Committer: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > CommitDate: Mon, 9 Oct 2017 14:25:17 -0700
> >
> > sched,rcu: Make cond_resched() provide RCU quiescent state
> >
> > There is some confusion as to which of cond_resched() or
> > cond_resched_rcu_qs() should be added to long in-kernel loops.
> > This commit therefore eliminates the decision by adding RCU quiescent
> > states to cond_resched(). This commit also simplifies the code that
> > used to interact with cond_resched_rcu_qs(), and that now interacts with
> > cond_resched(), to reduce its overhead. This reduction is necessary to
> > allow the heavier-weight cond_resched_rcu_qs() mechanism to be invoked
> > everywhere that cond_resched() is invoked.
> >
> > Part of that reduction in overhead converts the jiffies_till_sched_qs
> > kernel parameter to read-only at runtime, thus eliminating the need for
> > bounds checking.
>
> Thanks a lot Paul! I have just one question. Does the above mean that we
> can drop cond_resched_rcu_qs? Or there are still some scenarios when
> this is a better option?
Good point, and no time like the present! Please see commits cc1c305fff49
("netfilter: Eliminate cond_resched_rcu_qs() in favor of cond_resched()")
through cca9c4def233 ("rcu: Eliminate the cond_resched_rcu_qs()
definition") in my -rcu tree:
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
Thanx, Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state
2017-10-24 15:52 ` Paul E. McKenney
@ 2017-10-24 16:34 ` Michal Hocko
0 siblings, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2017-10-24 16:34 UTC (permalink / raw)
To: Paul E. McKenney
Cc: linux-kernel, peterz, tglx, mingo, hpa, linux-tip-commits
On Tue 24-10-17 08:52:14, Paul E. McKenney wrote:
> On Tue, Oct 24, 2017 at 12:59:03PM +0200, Michal Hocko wrote:
> > On Tue 24-10-17 03:02:09, tip-bot for Paul E. McKenney wrote:
> > > Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> > > Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf
> > > Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > > AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800
> > > Committer: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > > CommitDate: Mon, 9 Oct 2017 14:25:17 -0700
> > >
> > > sched,rcu: Make cond_resched() provide RCU quiescent state
> > >
> > > There is some confusion as to which of cond_resched() or
> > > cond_resched_rcu_qs() should be added to long in-kernel loops.
> > > This commit therefore eliminates the decision by adding RCU quiescent
> > > states to cond_resched(). This commit also simplifies the code that
> > > used to interact with cond_resched_rcu_qs(), and that now interacts with
> > > cond_resched(), to reduce its overhead. This reduction is necessary to
> > > allow the heavier-weight cond_resched_rcu_qs() mechanism to be invoked
> > > everywhere that cond_resched() is invoked.
> > >
> > > Part of that reduction in overhead converts the jiffies_till_sched_qs
> > > kernel parameter to read-only at runtime, thus eliminating the need for
> > > bounds checking.
> >
> > Thanks a lot Paul! I have just one question. Does the above mean that we
> > can drop cond_resched_rcu_qs? Or there are still some scenarios when
> > this is a better option?
>
> Good point, and no time like the present! Please see commits cc1c305fff49
> ("netfilter: Eliminate cond_resched_rcu_qs() in favor of cond_resched()")
> through cca9c4def233 ("rcu: Eliminate the cond_resched_rcu_qs()
> definition") in my -rcu tree:
cool stuff. Thanks!
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-24 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <tip-f79c3ad6189624c3de0ad5521610c9e22a1c33cf@git.kernel.org>
2017-10-24 10:59 ` [tip:core/rcu] sched,rcu: Make cond_resched() provide RCU quiescent state Michal Hocko
2017-10-24 15:52 ` Paul E. McKenney
2017-10-24 16:34 ` Michal Hocko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox