All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org,  kernel-team@meta.com,
	marco.crivellari@suse.com
Subject: Re: [PATCH 3/6] workqueue: release pwq pools by pool type
Date: Mon, 3 Aug 2026 07:02:46 -0700	[thread overview]
Message-ID: <anCfJptEjBlfuIhM@gmail.com> (raw)
In-Reply-To: <am_hXzrNnPT40MRw@slm.duckdns.org>

On Sun, Aug 02, 2026 at 02:31:27PM -1000, Tejun Heo wrote:
> On Fri, Jul 31, 2026 at 04:57:35AM -0700, Breno Leitao wrote:
> > pwq_release_workfn() calls put_unbound_pool() based on the WQ_UNBOUND
> > flag. That works today because an unbound workqueue only ever points at
> > unbound pools, but the flag is the wrong thing to test: what matters is
> > whether the pool is a refcounted unbound pool or a permanent per-cpu one.
> >
> > Add is_pool_cpu_specific() and key the release on it instead of the flag.
> > This is equivalent for every existing workqueue and stays correct if an
> > unbound pwq is ever backed by a per-cpu pool. Convert the other
> > open-coded pool->cpu type checks -- in put_unbound_pool(),
> > pool_allowed_cpus() and the workqueue watchdog -- to the same helper.
> > 
> > No functional change.
> 
> The first para saying that it's testing something wrong and then the patch
> not having any functional change reads odd. Can you please rewrite?

Fair, I meant that  the two conditions agree today and nothing changes
here. I will get this better.

> > +/* True if @pool is tied to a specific CPU, rather than an unbound
> > pool. */ +static bool is_pool_cpu_specific(struct worker_pool *pool)
> 
> I'm not sure about introducing a new term. Can we just stick to
> percpu?

Sure -- is_percpu_pool() any better?

Thanks,
--breno

  reply	other threads:[~2026-08-03 14:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 11:57 [PATCH 0/6] workqueue: base pwq pool release and nr_active on the backing pool Breno Leitao
2026-07-31 11:57 ` [PATCH 1/6] workqueue: factor out get_percpu_pool() Breno Leitao
2026-07-31 11:57 ` [PATCH 2/6] workqueue: factor out alloc_and_link_percpu_pwqs() Breno Leitao
2026-07-31 11:57 ` [PATCH 3/6] workqueue: release pwq pools by pool type Breno Leitao
2026-08-03  0:31   ` Tejun Heo
2026-08-03 14:02     ` Breno Leitao [this message]
2026-08-03 16:50       ` Tejun Heo
2026-07-31 11:57 ` [PATCH 4/6] workqueue: account nr_active by the backing pool Breno Leitao
2026-08-03  0:34   ` Tejun Heo
2026-08-03 14:19     ` Breno Leitao
2026-07-31 11:57 ` [PATCH 5/6] workqueue: add a per-cpu backend for unbound pwqs Breno Leitao
2026-08-03  0:36   ` Tejun Heo
2026-08-03 16:35     ` Breno Leitao
2026-08-03 16:58       ` Tejun Heo
2026-07-31 11:57 ` [PATCH 6/6] workqueue: install per-cpu pwqs at creation for __WQ_PERCPU_POOLS Breno Leitao

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=anCfJptEjBlfuIhM@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.