aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-01-04 18:09:03 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-13 03:06:02 -0500
commitf3a8b5c6aa543bd87764418d63632eb65b80e2f6 (patch)
treec579ced57838ee4f0504c5c295d283b37636e747 /kernel
parent07079d5357a4d53c2b13126c4a38fb40e6e04966 (diff)
rcu: Eliminate local variable signaled from force_quiescent_state()
Because the root rcu_node lock is held across entry to the switch statement in force_quiescent_state(), it is no longer necessary to snapshot rsp->signaled to a local variable. Eliminate both the snapshotting and the local variable. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com LKML-Reference: <1262646550602-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutree.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 41688ff60e07..1d8cfb1711fd 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1193,7 +1193,6 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
1193 unsigned long flags; 1193 unsigned long flags;
1194 long lastcomp; 1194 long lastcomp;
1195 struct rcu_node *rnp = rcu_get_root(rsp); 1195 struct rcu_node *rnp = rcu_get_root(rsp);
1196 u8 signaled;
1197 u8 forcenow; 1196 u8 forcenow;
1198 u8 gpdone; 1197 u8 gpdone;
1199 1198
@@ -1209,7 +1208,6 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
1209 rsp->n_force_qs++; 1208 rsp->n_force_qs++;
1210 spin_lock(&rnp->lock); /* irqs already disabled */ 1209 spin_lock(&rnp->lock); /* irqs already disabled */
1211 lastcomp = rsp->gpnum - 1; 1210 lastcomp = rsp->gpnum - 1;
1212 signaled = rsp->signaled;
1213 rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS; 1211 rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
1214 if(!rcu_gp_in_progress(rsp)) { 1212 if(!rcu_gp_in_progress(rsp)) {
1215 rsp->n_force_qs_ngp++; 1213 rsp->n_force_qs_ngp++;
@@ -1217,7 +1215,7 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
1217 goto unlock_fqs_ret; /* no GP in progress, time updated. */ 1215 goto unlock_fqs_ret; /* no GP in progress, time updated. */
1218 } 1216 }
1219 rsp->fqs_active = 1; 1217 rsp->fqs_active = 1;
1220 switch (signaled) { 1218 switch (rsp->signaled) {
1221 case RCU_GP_IDLE: 1219 case RCU_GP_IDLE:
1222 case RCU_GP_INIT: 1220 case RCU_GP_INIT:
1223 1221
@@ -1242,11 +1240,10 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
1242 /* Update state, record completion counter. */ 1240 /* Update state, record completion counter. */
1243 forcenow = 0; 1241 forcenow = 0;
1244 if (lastcomp + 1 == rsp->gpnum && 1242 if (lastcomp + 1 == rsp->gpnum &&
1245 lastcomp == rsp->completed && 1243 lastcomp == rsp->completed) {
1246 rsp->signaled == signaled) { 1244 forcenow = rsp->signaled == RCU_SAVE_COMPLETED;
1247 rsp->signaled = RCU_FORCE_QS; 1245 rsp->signaled = RCU_FORCE_QS;
1248 rsp->completed_fqs = lastcomp; 1246 rsp->completed_fqs = lastcomp;
1249 forcenow = signaled == RCU_SAVE_COMPLETED;
1250 } 1247 }
1251 if (!forcenow) 1248 if (!forcenow)
1252 break; 1249 break;