diff options
| author | Paul E. McKenney <paulmck@linux.ibm.com> | 2018-11-06 22:18:45 -0500 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2018-11-27 12:21:44 -0500 |
| commit | 25b0077511fe7cf1b876174f8481fb1742f4fb4d (patch) | |
| tree | f232adb988de8070306c050e02dfbdb549bb59da /kernel/workqueue.c | |
| parent | cb2f55369d3a9e6cf5c34d2da39eb242279a582d (diff) | |
workqueue: Replace call_rcu_sched() with call_rcu()
Now that call_rcu()'s callback is not invoked until after all
preempt-disable regions of code have completed (in addition to explicitly
marked RCU read-side critical sections), call_rcu() can be used in place
of call_rcu_sched(). This commit therefore makes that change.
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 0280deac392e..392be4b252f6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -3396,7 +3396,7 @@ static void put_unbound_pool(struct worker_pool *pool) | |||
| 3396 | del_timer_sync(&pool->mayday_timer); | 3396 | del_timer_sync(&pool->mayday_timer); |
| 3397 | 3397 | ||
| 3398 | /* sched-RCU protected to allow dereferences from get_work_pool() */ | 3398 | /* sched-RCU protected to allow dereferences from get_work_pool() */ |
| 3399 | call_rcu_sched(&pool->rcu, rcu_free_pool); | 3399 | call_rcu(&pool->rcu, rcu_free_pool); |
| 3400 | } | 3400 | } |
| 3401 | 3401 | ||
| 3402 | /** | 3402 | /** |
| @@ -3503,14 +3503,14 @@ static void pwq_unbound_release_workfn(struct work_struct *work) | |||
| 3503 | put_unbound_pool(pool); | 3503 | put_unbound_pool(pool); |
| 3504 | mutex_unlock(&wq_pool_mutex); | 3504 | mutex_unlock(&wq_pool_mutex); |
| 3505 | 3505 | ||
| 3506 | call_rcu_sched(&pwq->rcu, rcu_free_pwq); | 3506 | call_rcu(&pwq->rcu, rcu_free_pwq); |
| 3507 | 3507 | ||
| 3508 | /* | 3508 | /* |
| 3509 | * If we're the last pwq going away, @wq is already dead and no one | 3509 | * If we're the last pwq going away, @wq is already dead and no one |
| 3510 | * is gonna access it anymore. Schedule RCU free. | 3510 | * is gonna access it anymore. Schedule RCU free. |
| 3511 | */ | 3511 | */ |
| 3512 | if (is_last) | 3512 | if (is_last) |
| 3513 | call_rcu_sched(&wq->rcu, rcu_free_wq); | 3513 | call_rcu(&wq->rcu, rcu_free_wq); |
| 3514 | } | 3514 | } |
| 3515 | 3515 | ||
| 3516 | /** | 3516 | /** |
| @@ -4195,7 +4195,7 @@ void destroy_workqueue(struct workqueue_struct *wq) | |||
| 4195 | * The base ref is never dropped on per-cpu pwqs. Directly | 4195 | * The base ref is never dropped on per-cpu pwqs. Directly |
| 4196 | * schedule RCU free. | 4196 | * schedule RCU free. |
| 4197 | */ | 4197 | */ |
| 4198 | call_rcu_sched(&wq->rcu, rcu_free_wq); | 4198 | call_rcu(&wq->rcu, rcu_free_wq); |
| 4199 | } else { | 4199 | } else { |
| 4200 | /* | 4200 | /* |
| 4201 | * We're the sole accessor of @wq at this point. Directly | 4201 | * We're the sole accessor of @wq at this point. Directly |
