mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
	 linux-kernel@vger.kernel.org, pmladek@suse.com,
	gustavold@gmail.com, david.dai@linux.dev,  kernel-team@meta.com
Subject: Re: [PATCH 3/5] workqueue: make the default pwq optional
Date: Wed, 26 Aug 2026 09:33:22 -0700	[thread overview]
Message-ID: <ao8VMcX-_J_UtkfS@gmail.com> (raw)
In-Reply-To: <CAAofZF6fuXO-SGM1k9jeOA4SP+y01TKrcyb69MDVOXGTnhOMZg@mail.gmail.com>

On Wed, Aug 26, 2026 at 10:22:52AM +0200, Marco Crivellari wrote:
> Hi Breno,
> 
> On Wed, Aug 19, 2026 at 4:37 PM Breno Leitao <leitao@debian.org> wrote:
> >
> > apply_wqattrs_prepare() always creates a dfl_pwq, the fallback a CPU
> > uses when it has no pwq of its own. This is a CPU unbound field, so, we
> > don't need it for the per cpu affinity version of workqueue.
> >
> > A percpu workqueue has no use for one. Skip the allocation for
> > a WQ_PERCPU workqueue and skip installing what was not allocated.
> 
> What do you think about factoring this code out into a new function?
> So that it can later be called also when a CPU (with the "preferred
> percpu" flag set) is isolated through cgroup. I guess the dfl_pwq
> should be allocated / freed accordingly (?)

Makes sense as a direction: once a percpu workqueue loses a CPU it needs
somewhere to send that CPU's work, and after this patch it has no
dfl_pwq to fall back to.

Thanks for the review,
--breno

  reply	other threads:[~2026-08-26 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 14:37 [PATCH 0/5] workqueue: unify percpu and unbound pwq allocation Breno Leitao
2026-08-19 14:37 ` [PATCH 1/5] workqueue: move the unbound-only attrs check to apply_workqueue_attrs() Breno Leitao
2026-08-19 14:37 ` [PATCH 2/5] workqueue: resolve the backing pool in alloc_pwq() Breno Leitao
2026-08-19 14:37 ` [PATCH 3/5] workqueue: make the default pwq optional Breno Leitao
2026-08-26  8:22   ` Marco Crivellari
2026-08-26 16:33     ` Breno Leitao [this message]
2026-08-19 14:37 ` [PATCH 4/5] workqueue: build percpu pwqs through the attrs path Breno Leitao
2026-08-19 14:37 ` [PATCH 5/5] workqueue: rename the pwq slot helpers shared with percpu 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=ao8VMcX-_J_UtkfS@gmail.com \
    --to=leitao@debian.org \
    --cc=david.dai@linux.dev \
    --cc=gustavold@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.crivellari@suse.com \
    --cc=pmladek@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®