aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-12-29 17:52:41 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-03-26 11:04:52 -0400
commitb92db6cb7efcbd41e469e1d757c47da4865f7622 (patch)
treeeb01e59dc149f3c6f0faa581b3cf56a25122c521 /kernel/rcutree.c
parentc0f4dfd4f90f1667d234d21f15153ea09a2eaa66 (diff)
rcu: Rearrange locking in rcu_start_gp()
If CPUs are to give prior notice of needed grace periods, it will be necessary to invoke rcu_start_gp() without dropping the root rcu_node structure's ->lock. This commit takes a first step in this direction by moving the release of this lock to the end of rcu_start_gp(). Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 7b1d7769872a..2c6a9314c7f7 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1521,16 +1521,14 @@ rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
1521 raw_spin_unlock_irqrestore(&rnp->lock, flags); 1521 raw_spin_unlock_irqrestore(&rnp->lock, flags);
1522 return; 1522 return;
1523 } 1523 }
1524
1525 rsp->gp_flags = RCU_GP_FLAG_INIT; 1524 rsp->gp_flags = RCU_GP_FLAG_INIT;
1526 raw_spin_unlock(&rnp->lock); /* Interrupts remain disabled. */
1527 1525
1528 /* Ensure that CPU is aware of completion of last grace period. */ 1526 /* Ensure that CPU is aware of completion of last grace period. */
1529 rcu_process_gp_end(rsp, rdp); 1527 __rcu_process_gp_end(rsp, rdp->mynode, rdp);
1530 local_irq_restore(flags);
1531 1528
1532 /* Wake up rcu_gp_kthread() to start the grace period. */ 1529 /* Wake up rcu_gp_kthread() to start the grace period. */
1533 wake_up(&rsp->gp_wq); 1530 wake_up(&rsp->gp_wq);
1531 raw_spin_unlock_irqrestore(&rnp->lock, flags);
1534} 1532}
1535 1533
1536/* 1534/*