Re: [PATCH 4/5] workqueue: build percpu pwqs through the attrs path
From: Tejun Heo
Date: Mon Aug 31 2026 - 18:23:27 EST
Hello,
On Wed, Aug 19, 2026 at 07:37:38AM -0700, Breno Leitao wrote:
> if (!(wq->flags & WQ_UNBOUND)) {
> - ret = alloc_and_link_percpu_pwqs(wq);
> + ret = apply_workqueue_attrs_locked(wq, percpu_std_wq_attrs[highpri]);
Applied 4-5 to wq/for-7.4.
One note: if pwq allocation fails partway through
apply_wqattrs_prepare(), the already allocated pwqs are released through
pwq_release_worker, which isn't created until workqueue_init(). Percpu
workqueues are created before that, so an allocation failure in that
window now oopses instead of failing cleanly. An allocation failing that
early is unrecoverable anyway, so this doesn't need handling, but it
probably deserves a comment.
Thanks.
--
tejun