Skip to content
Commit 5f99fee6 authored by Tejun Heo's avatar Tejun Heo Committed by Sasha Levin
Browse files

workqueue: Make wq_adjust_max_active() round-robin pwqs while activating



[ Upstream commit c5404d4e ]

wq_adjust_max_active() needs to activate work items after max_active is
increased. Previously, it did that by visiting each pwq once activating all
that could be activated. While this makes sense with per-pwq nr_active,
nr_active will be shared across multiple pwqs for unbound wqs. Then, we'd
want to round-robin through pwqs to be fairer.

In preparation, this patch makes wq_adjust_max_active() round-robin pwqs
while activating. While the activation ordering changes, this shouldn't
cause user-noticeable behavior changes.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarLai Jiangshan <jiangshanlai@gmail.com>
Stable-dep-of: 5797b1c1 ("workqueue: Implement system-wide nr_active enforcement for unbound workqueues")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4023a2d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment