Re: [PATCH 4/6] workqueue: account nr_active by the backing pool
From: Tejun Heo
Date: Sun Aug 02 2026 - 20:34:23 EST
Hello,
On Fri, Jul 31, 2026 at 04:57:36AM -0700, Breno Leitao wrote:
> @@ -1796,6 +1799,10 @@ static bool pwq_tryinc_nr_active(struct pool_workqueue *pwq, bool fill)
> if (unlikely(pwq->plugged))
> return false;
>
> + nna = wq_node_nr_active(wq, pool->node);
> + if (WARN_ON_ONCE(!nna))
> + return false;
Would it make sense to turn WQ_UNBOUND test in wq_node_nr_active() into a
WARN_ON_ONCE()? And I don't think the return value needs a null check.
Thanks.
--
tejun