workqueue: Only assign rescuer work when really needed

[ Upstream commit 7b05c90b33 ]

If the pwq does not need rescue (normal workers have been created or
become available), the rescuer can immediately move on to other stalled
pwqs.

Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Stable-dep-of: e5a30c303b ("workqueue: Process rescuer work items one-by-one using a cursor")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Lai Jiangshan 2025-11-21 22:57:15 +08:00 • committed by Greg Kroah-Hartman
commit 5ec7110f5e