diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-03-19 14:10:43 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-06-10 16:39:42 -0400 |
commit | d34ea3221a0f34ed42eadabf054604bbcc7ecd27 (patch) | |
tree | 8a638346b2da58558abccf92f394372d098c4910 | |
parent | 398ebe6000c16135d12ce2ff64318f306ffb20b0 (diff) |
rcu: Rename note_new_gpnum() to note_gp_changes()
Because note_new_gpnum() now also checks for the ends of old grace periods,
this commit changes its name to note_gp_changes(). Later commits will merge
rcu_process_gp_end() into note_gp_changes().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r-- | kernel/rcutree.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 54aba759b609..7eb2bc95300a 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -1307,7 +1307,7 @@ __rcu_process_gp_end(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat | |||
1307 | * ->lock of the leaf rcu_node structure corresponding to the current CPU, | 1307 | * ->lock of the leaf rcu_node structure corresponding to the current CPU, |
1308 | * and must have irqs disabled. | 1308 | * and must have irqs disabled. |
1309 | */ | 1309 | */ |
1310 | static void __note_new_gpnum(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_data *rdp) | 1310 | static void __note_gp_changes(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_data *rdp) |
1311 | { | 1311 | { |
1312 | /* Handle the ends of any preceding grace periods first. */ | 1312 | /* Handle the ends of any preceding grace periods first. */ |
1313 | __rcu_process_gp_end(rsp, rnp, rdp); | 1313 | __rcu_process_gp_end(rsp, rnp, rdp); |
@@ -1326,19 +1326,20 @@ static void __note_new_gpnum(struct rcu_state *rsp, struct rcu_node *rnp, struct | |||
1326 | } | 1326 | } |
1327 | } | 1327 | } |
1328 | 1328 | ||
1329 | static void note_new_gpnum(struct rcu_state *rsp, struct rcu_data *rdp) | 1329 | static void note_gp_changes(struct rcu_state *rsp, struct rcu_data *rdp) |
1330 | { | 1330 | { |
1331 | unsigned long flags; | 1331 | unsigned long flags; |
1332 | struct rcu_node *rnp; | 1332 | struct rcu_node *rnp; |
1333 | 1333 | ||
1334 | local_irq_save(flags); | 1334 | local_irq_save(flags); |
1335 | rnp = rdp->mynode; | 1335 | rnp = rdp->mynode; |
1336 | if (rdp->gpnum == ACCESS_ONCE(rnp->gpnum) || /* outside lock. */ | 1336 | if ((rdp->gpnum == ACCESS_ONCE(rnp->gpnum) && |
1337 | rdp->completed == ACCESS_ONCE(rnp->completed)) || /* w/out lock. */ | ||
1337 | !raw_spin_trylock(&rnp->lock)) { /* irqs already off, so later. */ | 1338 | !raw_spin_trylock(&rnp->lock)) { /* irqs already off, so later. */ |
1338 | local_irq_restore(flags); | 1339 | local_irq_restore(flags); |
1339 | return; | 1340 | return; |
1340 | } | 1341 | } |
1341 | __note_new_gpnum(rsp, rnp, rdp); | 1342 | __note_gp_changes(rsp, rnp, rdp); |
1342 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 1343 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
1343 | } | 1344 | } |
1344 | 1345 | ||
@@ -1377,7 +1378,7 @@ check_for_new_grace_period(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1377 | 1378 | ||
1378 | local_irq_save(flags); | 1379 | local_irq_save(flags); |
1379 | if (rdp->gpnum != rsp->gpnum) { | 1380 | if (rdp->gpnum != rsp->gpnum) { |
1380 | note_new_gpnum(rsp, rdp); | 1381 | note_gp_changes(rsp, rdp); |
1381 | ret = 1; | 1382 | ret = 1; |
1382 | } | 1383 | } |
1383 | local_irq_restore(flags); | 1384 | local_irq_restore(flags); |
@@ -1396,7 +1397,7 @@ rcu_start_gp_per_cpu(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat | |||
1396 | __rcu_process_gp_end(rsp, rnp, rdp); | 1397 | __rcu_process_gp_end(rsp, rnp, rdp); |
1397 | 1398 | ||
1398 | /* Set state so that this CPU will detect the next quiescent state. */ | 1399 | /* Set state so that this CPU will detect the next quiescent state. */ |
1399 | __note_new_gpnum(rsp, rnp, rdp); | 1400 | __note_gp_changes(rsp, rnp, rdp); |
1400 | } | 1401 | } |
1401 | 1402 | ||
1402 | /* | 1403 | /* |