mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org, marco.crivellari@suse.com,
	 Breno Leitao <leitao@debian.org>,
	kernel-team@meta.com
Subject: [PATCH v2 8/9] workqueue: rename alloc_unbound_pwq() to alloc_pwq()
Date: Wed, 05 Aug 2026 07:52:35 -0700	[thread overview]
Message-ID: <20260805-wq-pool-refactor-v2-8-fd498d01d695@debian.org> (raw)
In-Reply-To: <20260805-wq-pool-refactor-v2-0-fd498d01d695@debian.org>

This allocates a pwq and binds it to the pool @attrs asks for.

Which pool that is becomes a property of the attrs (once per-cpu becomes
an affinity scope).

Remove the 'unbound" from the function name, given it will be bigger
than unbound.

No functional change.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 kernel/workqueue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index e13f223e8502d..65ac75431c3be 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5377,7 +5377,7 @@ static struct worker_pool *get_percpu_pool(struct workqueue_struct *wq, int cpu)
 }
 
 /* obtain a pool matching @attr and create a pwq associating the pool and @wq */
-static struct pool_workqueue *alloc_unbound_pwq(struct workqueue_struct *wq,
+static struct pool_workqueue *alloc_pwq(struct workqueue_struct *wq,
 					const struct workqueue_attrs *attrs)
 {
 	struct worker_pool *pool;
@@ -5500,7 +5500,7 @@ apply_wqattrs_prepare(struct workqueue_struct *wq,
 	copy_workqueue_attrs(new_attrs, attrs);
 	wqattrs_actualize_cpumask(new_attrs, unbound_cpumask);
 	cpumask_copy(new_attrs->__pod_cpumask, new_attrs->cpumask);
-	ctx->dfl_pwq = alloc_unbound_pwq(wq, new_attrs);
+	ctx->dfl_pwq = alloc_pwq(wq, new_attrs);
 	if (!ctx->dfl_pwq)
 		goto out_free;
 
@@ -5510,7 +5510,7 @@ apply_wqattrs_prepare(struct workqueue_struct *wq,
 			ctx->pwq_tbl[cpu] = ctx->dfl_pwq;
 		} else {
 			wq_calc_pod_cpumask(new_attrs, cpu);
-			ctx->pwq_tbl[cpu] = alloc_unbound_pwq(wq, new_attrs);
+			ctx->pwq_tbl[cpu] = alloc_pwq(wq, new_attrs);
 			if (!ctx->pwq_tbl[cpu])
 				goto out_free;
 		}
@@ -5654,7 +5654,7 @@ static void unbound_wq_update_pwq(struct workqueue_struct *wq, int cpu)
 		return;
 
 	/* create a new pwq */
-	pwq = alloc_unbound_pwq(wq, target_attrs);
+	pwq = alloc_pwq(wq, target_attrs);
 	if (!pwq) {
 		pr_warn("workqueue: allocation failed while updating CPU pod affinity of \"%s\"\n",
 			wq->name);

-- 
2.53.0-Meta


  parent reply	other threads:[~2026-08-05 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 14:52 [PATCH v2 0/9] workqueue: base pwq pool release and nr_active on the backing pool Breno Leitao
2026-08-05 14:52 ` [PATCH v2 1/9] workqueue: factor out get_percpu_pool() Breno Leitao
2026-08-05 14:52 ` [PATCH v2 2/9] workqueue: factor out alloc_and_link_percpu_pwqs() Breno Leitao
2026-08-05 14:52 ` [PATCH v2 3/9] workqueue: release pwq pools by pool type Breno Leitao
2026-08-05 14:52 ` [PATCH v2 4/9] workqueue: account nr_active by the backing pool Breno Leitao
2026-08-10 21:41   ` Tejun Heo
2026-08-11 10:15     ` Breno Leitao
2026-08-05 14:52 ` [PATCH v2 5/9] workqueue: test WQ_UNBOUND explicitly in the hotplug loops Breno Leitao
2026-08-05 14:52 ` [PATCH v2 6/9] workqueue: rename wq->unbound_attrs to wq->attrs Breno Leitao
2026-08-05 14:52 ` [PATCH v2 7/9] workqueue: allocate attrs for all workqueues Breno Leitao
2026-08-05 14:52 ` Breno Leitao [this message]
2026-08-05 14:52 ` [PATCH v2 9/9] workqueue: skip the node_nr_active update for non-unbound workqueues Breno Leitao
2026-08-10 22:10 ` [PATCH v2 0/9] workqueue: base pwq pool release and nr_active on the backing pool Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260805-wq-pool-refactor-v2-8-fd498d01d695@debian.org \
    --to=leitao@debian.org \
    --cc=jiangshanlai@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.crivellari@suse.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®