Commit c5404d4
committed
workqueue: Make wq_adjust_max_active() round-robin pwqs while activating
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: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>1 parent 1c270b7 commit c5404d4
1 file changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4710 | 4710 | | |
4711 | 4711 | | |
4712 | 4712 | | |
4713 | | - | |
| 4713 | + | |
4714 | 4714 | | |
4715 | 4715 | | |
4716 | 4716 | | |
| |||
4730 | 4730 | | |
4731 | 4731 | | |
4732 | 4732 | | |
4733 | | - | |
4734 | | - | |
4735 | | - | |
4736 | | - | |
4737 | | - | |
4738 | | - | |
4739 | | - | |
4740 | | - | |
| 4733 | + | |
| 4734 | + | |
| 4735 | + | |
| 4736 | + | |
| 4737 | + | |
| 4738 | + | |
4741 | 4739 | | |
4742 | | - | |
| 4740 | + | |
| 4741 | + | |
| 4742 | + | |
4743 | 4743 | | |
4744 | | - | |
4745 | | - | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
4746 | 4753 | | |
4747 | 4754 | | |
4748 | 4755 | | |
| |||
0 commit comments