Lines Matching refs:max_active
209 int max_active; /* L: max active works */
255 int saved_max_active; /* WQ: saved pwq max_active */
1193 if (pwq->nr_active < pwq->max_active)
1495 if (likely(pwq->nr_active < pwq->max_active)) {
3725 * pwq_adjust_max_active - update a pwq's max_active to the current setting
3728 * If @pwq isn't freezing, set @pwq->max_active to the associated
3730 * accordingly. If @pwq is freezing, clear @pwq->max_active to zero.
3742 if (!freezable && pwq->max_active == wq->saved_max_active)
3756 pwq->max_active = wq->saved_max_active;
3759 pwq->nr_active < pwq->max_active) {
3766 * max_active is bumped. In realtime scenarios, always kicking a
3773 pwq->max_active = 0;
3811 /* sync max_active to the current setting */
4227 static int wq_clamp_max_active(int max_active, unsigned int flags,
4232 if (max_active < 1 || max_active > lim)
4233 pr_warn("workqueue: max_active %d requested for %s is out of range, clamping between %d and %d\n",
4234 max_active, name, 1, lim);
4236 return clamp_val(max_active, 1, lim);
4273 int max_active, ...)
4281 * Unbound && max_active == 1 used to imply ordered, which is no
4287 if ((flags & WQ_UNBOUND) && max_active == 1)
4308 va_start(args, max_active);
4312 max_active = max_active ?: WQ_DFL_ACTIVE;
4313 max_active = wq_clamp_max_active(max_active, flags, wq->name);
4317 wq->saved_max_active = max_active;
4339 * Grab it, adjust max_active and add the new @wq to workqueues
4478 * workqueue_set_max_active - adjust max_active of a workqueue
4480 * @max_active: new max_active value.
4482 * Set max_active of @wq to @max_active.
4487 void workqueue_set_max_active(struct workqueue_struct *wq, int max_active)
4491 /* disallow meddling with max_active for ordered workqueues */
4495 max_active = wq_clamp_max_active(max_active, wq->flags, wq->name);
4500 wq->saved_max_active = max_active;
4722 pwq->nr_active, pwq->max_active, pwq->refcnt,
5287 /* restore max_active and repopulate worklist */
5398 * max_active RW int : maximum number of in-flight work items
5449 static DEVICE_ATTR_RW(max_active);
5696 * Adjusting max_active or creating new pwqs by applying
6012 * guaranteed by max_active which is enforced by pwqs.