diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-10-31 17:09:23 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-06 14:02:46 -0500 |
commit | 96e92021d4fad8543d598b5e4926cb34fd40c4c4 (patch) | |
tree | cf8ba84276cff7ec0a625f50153b8fd178350735 /kernel/rcu | |
parent | a8f4cbadfb5c5f7f5d9eef70821276a4e2e9289d (diff) |
rcu: Make use of rcu_preempt_has_tasks()
Given that there is now arcu_preempt_has_tasks() function that checks
to see if the ->blkd_tasks list is non-empty, this commit makes use of it.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index d594da48f4b4..bcc6d9134d47 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -540,7 +540,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp) | |||
540 | static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp) | 540 | static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp) |
541 | { | 541 | { |
542 | WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp)); | 542 | WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp)); |
543 | if (!list_empty(&rnp->blkd_tasks)) | 543 | if (rcu_preempt_has_tasks(rnp)) |
544 | rnp->gp_tasks = rnp->blkd_tasks.next; | 544 | rnp->gp_tasks = rnp->blkd_tasks.next; |
545 | WARN_ON_ONCE(rnp->qsmask); | 545 | WARN_ON_ONCE(rnp->qsmask); |
546 | } | 546 | } |
@@ -706,7 +706,7 @@ sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp) | |||
706 | 706 | ||
707 | raw_spin_lock_irqsave(&rnp->lock, flags); | 707 | raw_spin_lock_irqsave(&rnp->lock, flags); |
708 | smp_mb__after_unlock_lock(); | 708 | smp_mb__after_unlock_lock(); |
709 | if (list_empty(&rnp->blkd_tasks)) { | 709 | if (!rcu_preempt_has_tasks(rnp)) { |
710 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 710 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
711 | } else { | 711 | } else { |
712 | rnp->exp_tasks = rnp->blkd_tasks.next; | 712 | rnp->exp_tasks = rnp->blkd_tasks.next; |
@@ -985,7 +985,7 @@ void exit_rcu(void) | |||
985 | 985 | ||
986 | static void rcu_initiate_boost_trace(struct rcu_node *rnp) | 986 | static void rcu_initiate_boost_trace(struct rcu_node *rnp) |
987 | { | 987 | { |
988 | if (list_empty(&rnp->blkd_tasks)) | 988 | if (!rcu_preempt_has_tasks(rnp)) |
989 | rnp->n_balk_blkd_tasks++; | 989 | rnp->n_balk_blkd_tasks++; |
990 | else if (rnp->exp_tasks == NULL && rnp->gp_tasks == NULL) | 990 | else if (rnp->exp_tasks == NULL && rnp->gp_tasks == NULL) |
991 | rnp->n_balk_exp_gp_tasks++; | 991 | rnp->n_balk_exp_gp_tasks++; |