Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365510
b: refs/heads/master
c: 0fbd95a
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Mar 13, 2013
1 parent af6e996 commit 320c2e7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e62676169118bc2d42e5008b3f8872646313f077
refs/heads/master: 0fbd95aa8a056194933fba4ae78c50fc20f0704e
40 changes: 20 additions & 20 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3725,6 +3725,26 @@ static void pwq_unbound_release_workfn(struct work_struct *work)
kfree(wq);
}

/**
* pwq_set_max_active - adjust max_active of a pwq
* @pwq: target pool_workqueue
* @max_active: new max_active value.
*
* Set @pwq->max_active to @max_active and activate delayed works if
* increased.
*
* CONTEXT:
* spin_lock_irq(pool->lock).
*/
static void pwq_set_max_active(struct pool_workqueue *pwq, int max_active)
{
pwq->max_active = max_active;

while (!list_empty(&pwq->delayed_works) &&
pwq->nr_active < pwq->max_active)
pwq_activate_first_delayed(pwq);
}

static void init_and_link_pwq(struct pool_workqueue *pwq,
struct workqueue_struct *wq,
struct worker_pool *pool,
Expand Down Expand Up @@ -4011,26 +4031,6 @@ void destroy_workqueue(struct workqueue_struct *wq)
}
EXPORT_SYMBOL_GPL(destroy_workqueue);

/**
* pwq_set_max_active - adjust max_active of a pwq
* @pwq: target pool_workqueue
* @max_active: new max_active value.
*
* Set @pwq->max_active to @max_active and activate delayed works if
* increased.
*
* CONTEXT:
* spin_lock_irq(pool->lock).
*/
static void pwq_set_max_active(struct pool_workqueue *pwq, int max_active)
{
pwq->max_active = max_active;

while (!list_empty(&pwq->delayed_works) &&
pwq->nr_active < pwq->max_active)
pwq_activate_first_delayed(pwq);
}

/**
* workqueue_set_max_active - adjust max_active of a workqueue
* @wq: target workqueue
Expand Down

0 comments on commit 320c2e7

Please sign in to comment.