Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182233
b: refs/heads/master
c: 46a1e34
h: refs/heads/master
i:
  182231: 4d0c6ed
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Jan 13, 2010
1 parent ea57f23 commit aafab56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45f014c52eef022873b19d6a20eb0ec9668f2b09
refs/heads/master: 46a1e34eda805501a8b32f26394faa435149f6d1
8 changes: 8 additions & 0 deletions trunk/kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
struct rcu_node *rnp = rcu_get_root(rsp);

if (!cpu_needs_another_gp(rsp, rdp) || rsp->fqs_active) {
if (cpu_needs_another_gp(rsp, rdp))
rsp->fqs_need_gp = 1;
if (rnp->completed == rsp->completed) {
spin_unlock_irqrestore(&rnp->lock, flags);
return;
Expand Down Expand Up @@ -1239,6 +1241,12 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
break;
}
rsp->fqs_active = 0;
if (rsp->fqs_need_gp) {
spin_unlock(&rsp->fqslock); /* irqs remain disabled */
rsp->fqs_need_gp = 0;
rcu_start_gp(rsp, flags); /* releases rnp->lock */
return;
}
spin_unlock(&rnp->lock); /* irqs remain disabled */
unlock_fqs_ret:
spin_unlock_irqrestore(&rsp->fqslock, flags);
Expand Down
5 changes: 5 additions & 0 deletions trunk/kernel/rcutree.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ struct rcu_state {
/* Force QS state. */
u8 fqs_active; /* force_quiescent_state() */
/* is running. */
u8 fqs_need_gp; /* A CPU was prevented from */
/* starting a new grace */
/* period because */
/* force_quiescent_state() */
/* was running. */
long gpnum; /* Current gp number. */
long completed; /* # of last completed gp. */

Expand Down

0 comments on commit aafab56

Please sign in to comment.