Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182231
b: refs/heads/master
c: ee47eb9
h: refs/heads/master
i:
  182229: b09f48d
  182227: 94763fb
  182223: 7ead65c
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Jan 13, 2010
1 parent fef8c6a commit 4d0c6ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 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: 0f10dc826646134dce3e5751512b87d30f3903e4
refs/heads/master: ee47eb9f4da6f44af965d6d049e77ee8c8a4b822
22 changes: 5 additions & 17 deletions trunk/kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ void rcu_check_callbacks(int cpu, int user)
/*
* Scan the leaf rcu_node structures, processing dyntick state for any that
* have not yet encountered a quiescent state, using the function specified.
* The caller must have suppressed start of new grace periods.
*/
static void rcu_process_dyntick(struct rcu_state *rsp,
int (*f)(struct rcu_data *))
Expand All @@ -1157,7 +1158,7 @@ static void rcu_process_dyntick(struct rcu_state *rsp,
rcu_for_each_leaf_node(rsp, rnp) {
mask = 0;
spin_lock_irqsave(&rnp->lock, flags);
if (rnp->completed != rsp->gpnum - 1) {
if (!rcu_gp_in_progress(rsp)) {
spin_unlock_irqrestore(&rnp->lock, flags);
return;
}
Expand All @@ -1171,7 +1172,7 @@ static void rcu_process_dyntick(struct rcu_state *rsp,
if ((rnp->qsmask & bit) != 0 && f(rsp->rda[cpu]))
mask |= bit;
}
if (mask != 0 && rnp->completed == rsp->gpnum - 1) {
if (mask != 0 && rcu_gp_in_progress(rsp)) {

/* rcu_report_qs_rnp() releases rnp->lock. */
rcu_report_qs_rnp(mask, rsp, rnp, flags);
Expand All @@ -1189,7 +1190,6 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
{
unsigned long flags;
struct rcu_node *rnp = rcu_get_root(rsp);
u8 forcenow;

if (!rcu_gp_in_progress(rsp))
return; /* No grace period in progress, nothing to force. */
Expand Down Expand Up @@ -1224,21 +1224,9 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
/* Record dyntick-idle state. */
rcu_process_dyntick(rsp, dyntick_save_progress_counter);
spin_lock(&rnp->lock); /* irqs already disabled */
if (!rcu_gp_in_progress(rsp))
break;
/* fall into next case. */

case RCU_SAVE_COMPLETED:

/* Update state, record completion counter. */
forcenow = 0;
if (rsp->gpnum - 1 == rsp->completed) {
forcenow = rsp->signaled == RCU_SAVE_COMPLETED;
if (rcu_gp_in_progress(rsp))
rsp->signaled = RCU_FORCE_QS;
}
if (!forcenow)
break;
/* fall into next case. */
break;

case RCU_FORCE_QS:

Expand Down
5 changes: 2 additions & 3 deletions trunk/kernel/rcutree.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,11 @@ struct rcu_data {
#define RCU_GP_IDLE 0 /* No grace period in progress. */
#define RCU_GP_INIT 1 /* Grace period being initialized. */
#define RCU_SAVE_DYNTICK 2 /* Need to scan dyntick state. */
#define RCU_SAVE_COMPLETED 3 /* Need to save rsp->completed. */
#define RCU_FORCE_QS 4 /* Need to force quiescent state. */
#define RCU_FORCE_QS 3 /* Need to force quiescent state. */
#ifdef CONFIG_NO_HZ
#define RCU_SIGNAL_INIT RCU_SAVE_DYNTICK
#else /* #ifdef CONFIG_NO_HZ */
#define RCU_SIGNAL_INIT RCU_SAVE_COMPLETED
#define RCU_SIGNAL_INIT RCU_FORCE_QS
#endif /* #else #ifdef CONFIG_NO_HZ */

#define RCU_JIFFIES_TILL_FORCE_QS 3 /* for rsp->jiffies_force_qs */
Expand Down

0 comments on commit 4d0c6ed

Please sign in to comment.