]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
workqueue: Replace pwq_activate_inactive_work() with [__]pwq_activate_work()
authorTejun Heo <tj@kernel.org>
Mon, 29 Jan 2024 18:11:24 +0000 (08:11 -1000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:16:25 +0000 (18:16 -0400)
commitf4505c2033ad25839f6fd9be6fc474b8306c44eb
treebba08f1be0d32b9a43a598f3d31bf125b1b6b127
parent70abdc2f6c906ffea699f6e0e08fcbd9437e6bcc
workqueue: Replace pwq_activate_inactive_work() with [__]pwq_activate_work()

[ Upstream commit 4c6380305d21e36581b451f7337a36c93b64e050 ]

To prepare for unbound nr_active handling improvements, move work activation
part of pwq_activate_inactive_work() into __pwq_activate_work() and add
pwq_activate_work() which tests WORK_STRUCT_INACTIVE and updates nr_active.

pwq_activate_first_inactive() and try_to_grab_pending() are updated to use
pwq_activate_work(). The latter conversion is functionally identical. For
the former, this conversion adds an unnecessary WORK_STRUCT_INACTIVE
testing. This is temporary and will be removed by the next patch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
Stable-dep-of: 5797b1c18919 ("workqueue: Implement system-wide nr_active enforcement for unbound workqueues")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/workqueue.c