diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-03-19 15:38:24 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-06-10 16:39:44 -0400 |
commit | 05eb552bf5ed9e7277bdc9c273ed2f4e9b7dc3e5 (patch) | |
tree | 9355073909b25cf7ec13f8157326b9f321711d92 /kernel/rcutree.c | |
parent | ce3d9c03d1fa079678cc8df1517011e215517cda (diff) |
rcu: Move redundant call to note_gp_changes() into called function
The __rcu_process_callbacks() invokes note_gp_changes() immediately
before invoking rcu_check_quiescent_state(), which conditionally
invokes that same function. This commit therefore eliminates the
call to note_gp_changes() in __rcu_process_callbacks() in favor of
making unconditional to call from rcu_check_quiescent_state() to
note_gp_changes().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 391bd724cd77..7a5194ef90da 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -1716,11 +1716,8 @@ rcu_report_qs_rdp(int cpu, struct rcu_state *rsp, struct rcu_data *rdp) | |||
1716 | static void | 1716 | static void |
1717 | rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp) | 1717 | rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp) |
1718 | { | 1718 | { |
1719 | /* If there is now a new grace period, record and return. */ | 1719 | /* Check for grace-period ends and beginnings. */ |
1720 | if (rdp->gpnum != rsp->gpnum) { | 1720 | note_gp_changes(rsp, rdp); |
1721 | note_gp_changes(rsp, rdp); | ||
1722 | return; | ||
1723 | } | ||
1724 | 1721 | ||
1725 | /* | 1722 | /* |
1726 | * Does this CPU still need to do its part for current grace period? | 1723 | * Does this CPU still need to do its part for current grace period? |
@@ -2184,9 +2181,6 @@ __rcu_process_callbacks(struct rcu_state *rsp) | |||
2184 | 2181 | ||
2185 | WARN_ON_ONCE(rdp->beenonline == 0); | 2182 | WARN_ON_ONCE(rdp->beenonline == 0); |
2186 | 2183 | ||
2187 | /* Handle the end of a grace period that some other CPU ended. */ | ||
2188 | note_gp_changes(rsp, rdp); | ||
2189 | |||
2190 | /* Update RCU state based on any recent quiescent states. */ | 2184 | /* Update RCU state based on any recent quiescent states. */ |
2191 | rcu_check_quiescent_state(rsp, rdp); | 2185 | rcu_check_quiescent_state(rsp, rdp); |
2192 | 2186 | ||