Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15018
b: refs/heads/master
c: c3f5902
h: refs/heads/master
v: v3
  • Loading branch information
Srivatsa Vaddagiri authored and Linus Torvalds committed Dec 12, 2005
1 parent 84a130d commit 88e99e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: 89d46b8778f65223f732d82c0166e0abba20fb1e
refs/heads/master: c3f5902325d3053986e7359f706581d8f032e72f
18 changes: 13 additions & 5 deletions trunk/kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,23 @@ static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp,

if (rcp->next_pending &&
rcp->completed == rcp->cur) {
/* Can't change, since spin lock held. */
cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask);

rcp->next_pending = 0;
/* next_pending == 0 must be visible in __rcu_process_callbacks()
* before it can see new value of cur.
/*
* next_pending == 0 must be visible in
* __rcu_process_callbacks() before it can see new value of cur.
*/
smp_wmb();
rcp->cur++;

/*
* Accessing nohz_cpu_mask before incrementing rcp->cur needs a
* Barrier Otherwise it can cause tickless idle CPUs to be
* included in rsp->cpumask, which will extend graceperiods
* unnecessarily.
*/
smp_mb();
cpus_andnot(rsp->cpumask, cpu_online_map, nohz_cpu_mask);

}
}

Expand Down

0 comments on commit 88e99e2

Please sign in to comment.