/* * Return true if an RCU grace period is in progress. The ACCESS_ONCE()s@@ -376,7 +381,7 @@ static long dyntick_recall_completed(struct rcu_state *rsp) /* * Snapshot the specified CPU's dynticks counter so that we can later * credit them with an implicit quiescent state. Return 1 if this CPU- * is already in a quiescent state courtesy of dynticks idle mode.+ * is in dynticks idle mode, which is an extended quiescent state. */ static int dyntick_save_progress_counter(struct rcu_data *rdp) {@@ -619,9 +624,15 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags) note_new_gpnum(rsp, rdp);

/*- * Because we are first, we know that all our callbacks will- * be covered by this upcoming grace period, even the ones- * that were registered arbitrarily recently.+ * Because this CPU just now started the new grace period, we know+ * that all of its callbacks will be covered by this upcoming grace+ * period, even the ones that were registered arbitrarily recently.+ * Therefore, advance all outstanding callbacks to RCU_WAIT_TAIL.+ * + * Other CPUs cannot be sure exactly when the grace period started.+ * Therefore, their recently registered callbacks must pass through+ * an additional RCU_NEXT_READY stage, so that they will be handled+ * by the next RCU grace period. */ rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];@@ -881,7 +892,7 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp)

/* * Move callbacks from the outgoing CPU to the running CPU.- * Note that the outgoing CPU is now quiscent, so it is now+ * Note that the outgoing CPU is now quiescent, so it is now * (uncharacteristically) safe to access its rcu_data structure. * Note also that we must carefully retain the order of the * outgoing CPU's callbacks in order for rcu_barrier() to work@@ -1572,25 +1583,6 @@ do { \ } \ } while (0)