static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
{
unsigned long flags;
- long lastcomp;
struct rcu_node *rnp = rcu_get_root(rsp);
u8 forcenow;
u8 gpdone;
goto unlock_fqs_ret; /* no emergency and done recently. */
rsp->n_force_qs++;
spin_lock(&rnp->lock); /* irqs already disabled */
- lastcomp = rsp->gpnum - 1;
rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
if(!rcu_gp_in_progress(rsp)) {
rsp->n_force_qs_ngp++;
break; /* So gcc recognizes the dead code. */
/* Record dyntick-idle state. */
- gpdone = rcu_process_dyntick(rsp, lastcomp,
+ gpdone = rcu_process_dyntick(rsp, rsp->gpnum - 1,
dyntick_save_progress_counter);
spin_lock(&rnp->lock); /* irqs already disabled */
if (gpdone)
/* Update state, record completion counter. */
forcenow = 0;
- if (lastcomp + 1 == rsp->gpnum &&
- lastcomp == rsp->completed) {
+ if (rsp->gpnum - 1 == rsp->completed) {
forcenow = rsp->signaled == RCU_SAVE_COMPLETED;
rsp->signaled = RCU_FORCE_QS;
- rsp->completed_fqs = lastcomp;
}
if (!forcenow)
break;
/* Check dyntick-idle state, send IPI to laggarts. */
spin_unlock(&rnp->lock); /* irqs remain disabled */
- gpdone = rcu_process_dyntick(rsp, rsp->completed_fqs,
+ gpdone = rcu_process_dyntick(rsp, rsp->gpnum - 1,
rcu_implicit_dynticks_qs);
/* Leave state in case more forcing is required. */
long orphan_qlen; /* Number of orphaned cbs. */
spinlock_t fqslock; /* Only one task forcing */
/* quiescent states. */
- long completed_fqs; /* Value of completed @ snap. */
- /* Protected by fqslock. */
unsigned long jiffies_force_qs; /* Time at which to invoke */
/* force_quiescent_state(). */
unsigned long n_force_qs; /* Number of calls to */