projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cf1008
)
rcu: Short-circuit synchronize_sched_expedited() if only one CPU
author
Paul E. McKenney
<paulmck@linux.vnet.ibm.com>
Tue, 29 Sep 2015 15:15:52 +0000
(08:15 -0700)
committer
Paul E. McKenney
<paulmck@linux.vnet.ibm.com>
Fri, 4 Dec 2015 20:26:50 +0000
(12:26 -0800)
If there is only one CPU, then invoking synchronize_sched_expedited()
is by definition a grace period. This commit checks for this condition
and does a short-circuit return in that case.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/rcu/tree.c
b/kernel/rcu/tree.c
index 81aa1cdc6bc99b1f164aeb2dd1178764b914913b..bd2605c144ccf208b298c7c2694d881528a72add 100644
(file)
--- a/
kernel/rcu/tree.c
+++ b/
kernel/rcu/tree.c
@@
-3822,6
+3822,10
@@
void synchronize_sched_expedited(void)
struct rcu_node *rnp;
struct rcu_state *rsp = &rcu_sched_state;
+ /* If only one CPU, this is automatically a grace period. */
+ if (rcu_blocking_is_gp())
+ return;
+
/* Take a snapshot of the sequence number. */
s = rcu_exp_gp_seq_snap(rsp);