aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/workqueue.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f5c8bbb9ada3..d51928981615 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3725,6 +3725,26 @@ static void pwq_unbound_release_workfn(struct work_struct *work)
3725 kfree(wq); 3725 kfree(wq);
3726} 3726}
3727 3727
3728/**
3729 * pwq_set_max_active - adjust max_active of a pwq
3730 * @pwq: target pool_workqueue
3731 * @max_active: new max_active value.
3732 *
3733 * Set @pwq->max_active to @max_active and activate delayed works if
3734 * increased.
3735 *
3736 * CONTEXT:
3737 * spin_lock_irq(pool->lock).
3738 */
3739static void pwq_set_max_active(struct pool_workqueue *pwq, int max_active)
3740{
3741 pwq->max_active = max_active;
3742
3743 while (!list_empty(&pwq->delayed_works) &&
3744 pwq->nr_active < pwq->max_active)
3745 pwq_activate_first_delayed(pwq);
3746}
3747
3728static void init_and_link_pwq(struct pool_workqueue *pwq, 3748static void init_and_link_pwq(struct pool_workqueue *pwq,
3729 struct workqueue_struct *wq, 3749 struct workqueue_struct *wq,
3730 struct worker_pool *pool, 3750 struct worker_pool *pool,
@@ -4012,26 +4032,6 @@ void destroy_workqueue(struct workqueue_struct *wq)
4012EXPORT_SYMBOL_GPL(destroy_workqueue); 4032EXPORT_SYMBOL_GPL(destroy_workqueue);
4013 4033
4014/** 4034/**
4015 * pwq_set_max_active - adjust max_active of a pwq
4016 * @pwq: target pool_workqueue
4017 * @max_active: new max_active value.
4018 *
4019 * Set @pwq->max_active to @max_active and activate delayed works if
4020 * increased.
4021 *
4022 * CONTEXT:
4023 * spin_lock_irq(pool->lock).
4024 */
4025static void pwq_set_max_active(struct pool_workqueue *pwq, int max_active)
4026{
4027 pwq->max_active = max_active;
4028
4029 while (!list_empty(&pwq->delayed_works) &&
4030 pwq->nr_active < pwq->max_active)
4031 pwq_activate_first_delayed(pwq);
4032}
4033
4034/**
4035 * workqueue_set_max_active - adjust max_active of a workqueue 4035 * workqueue_set_max_active - adjust max_active of a workqueue
4036 * @wq: target workqueue 4036 * @wq: target workqueue
4037 * @max_active: new max_active value. 4037 * @max_active: new max_active value.