sched,rcu: Make cond_resched() provide RCU quiescent state
Quoted 18 lines · tip-bot for Paul E. McKenney
Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf Author: Paul E. McKenney <[email protected]> AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800 Committer: Paul E. McKenney <[email protected]> CommitDate: Mon, 9 Oct 2017 14:25:17 -0700sched,rcu: Make
cond_resched()provide RCU quiescent stateThere is some confusion as to which of
cond_resched()orcond_resched_rcu_qs()should be added to long in-kernel loops. This commit therefore eliminates the decision by adding RCU quiescent states tocond_resched(). This commit also simplifies the code that used to interact withcond_resched_rcu_qs(), and that now interacts withcond_resched(), to reduce its overhead. This reduction is necessary to allow the heavier-weightcond_resched_rcu_qs()mechanism to be invoked everywhere thatcond_resched()is invoked.
Quoted 3 lines
Part of that reduction in overhead converts the
jiffies_till_sched_qskernel 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?
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 19 lines · Michal Hocko
Quoted 18 lines · tip-bot for Paul E. McKenney
Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf Author: Paul E. McKenney <[email protected]> AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800 Committer: Paul E. McKenney <[email protected]> CommitDate: Mon, 9 Oct 2017 14:25:17 -0700sched,rcu: Make
cond_resched()provide RCU quiescent stateThere is some confusion as to which of
cond_resched()orcond_resched_rcu_qs()should be added to long in-kernel loops. This commit therefore eliminates the decision by adding RCU quiescent states tocond_resched(). This commit also simplifies the code that used to interact withcond_resched_rcu_qs(), and that now interacts withcond_resched(), to reduce its overhead. This reduction is necessary to allow the heavier-weightcond_resched_rcu_qs()mechanism to be invoked everywhere thatcond_resched()is invoked.
Quoted 7 lines
Quoted 3 lines
Part of that reduction in overhead converts the
jiffies_till_sched_qskernel 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
Quoted 24 lines · Paul E. McKenney
Quoted 23 lines · Michal Hocko
Quoted 21 lines · tip-bot for Paul E. McKenney
Commit-ID: f79c3ad6189624c3de0ad5521610c9e22a1c33cf Gitweb: https://git.kernel.org/tip/f79c3ad6189624c3de0ad5521610c9e22a1c33cf Author: Paul E. McKenney <[email protected]> AuthorDate: Wed, 30 Nov 2016 06:24:30 -0800 Committer: Paul E. McKenney <[email protected]> CommitDate: Mon, 9 Oct 2017 14:25:17 -0700sched,rcu: Make
cond_resched()provide RCU quiescent stateThere is some confusion as to which of
cond_resched()orcond_resched_rcu_qs()should be added to long in-kernel loops. This commit therefore eliminates the decision by adding RCU quiescent states tocond_resched(). This commit also simplifies the code that used to interact withcond_resched_rcu_qs(), and that now interacts withcond_resched(), to reduce its overhead. This reduction is necessary to allow the heavier-weightcond_resched_rcu_qs()mechanism to be invoked everywhere thatcond_resched()is invoked.Part of that reduction in overhead converts the
jiffies_till_sched_qskernel parameter to read-only at runtime, thus eliminating the need for bounds checking.
Quoted 8 lines
Quoted 3 lines
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: Eliminatecond_resched_rcu_qs()in favor ofcond_resched()") throughcca9c4def233("rcu: Eliminate thecond_resched_rcu_qs()definition") in my -rcu tree:
cool stuff. Thanks!
Signature · 2 lines
Michal Hocko SUSE Labs