Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223807
b: refs/heads/master
c: 121dfc4
h: refs/heads/master
i:
  223805: 3fa5a8c
  223803: ff5a9e3
  223799: 30bd036
  223791: 8aacfdc
  223775: b4bbc42
  223743: 63afd0d
v: v3
  • Loading branch information
Paul E. McKenney committed Dec 17, 2010
1 parent cf11cf3 commit 90282ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ff8e6f0535fe730e921ca347bc38dcb9e01791a
refs/heads/master: 121dfc4b3eba9e2f3c42d35205a3510cc65b9931
27 changes: 18 additions & 9 deletions trunk/kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,17 @@ static void __init check_cpu_stall_init(void)
static void __note_new_gpnum(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_data *rdp)
{
if (rdp->gpnum != rnp->gpnum) {
rdp->qs_pending = 1;
rdp->passed_quiesc = 0;
/*
* If the current grace period is waiting for this CPU,
* set up to detect a quiescent state, otherwise don't
* go looking for one.
*/
rdp->gpnum = rnp->gpnum;
if (rnp->qsmask & rdp->grpmask) {
rdp->qs_pending = 1;
rdp->passed_quiesc = 0;
} else
rdp->qs_pending = 0;
}
}

Expand Down Expand Up @@ -681,19 +689,20 @@ __rcu_process_gp_end(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat

/*
* If we were in an extended quiescent state, we may have
* missed some grace periods that others CPUs took care on
* missed some grace periods that others CPUs handled on
* our behalf. Catch up with this state to avoid noting
* spurious new grace periods.
* spurious new grace periods. If another grace period
* has started, then rnp->gpnum will have advanced, so
* we will detect this later on.
*/
if (rdp->completed > rdp->gpnum)
if (ULONG_CMP_LT(rdp->gpnum, rdp->completed))
rdp->gpnum = rdp->completed;

/*
* If another CPU handled our extended quiescent states and
* we have no more grace period to complete yet, then stop
* chasing quiescent states.
* If RCU does not need a quiescent state from this CPU,
* then make sure that this CPU doesn't go looking for one.
*/
if (rdp->completed == rnp->gpnum)
if ((rnp->qsmask & rdp->grpmask) == 0)
rdp->qs_pending = 0;
}
}
Expand Down

0 comments on commit 90282ad

Please sign in to comment.