From: Marco Crivellari <marco.crivellari@suse.com>
To: linux-kernel@vger.kernel.org
Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Marco Crivellari <marco.crivellari@suse.com>,
Michal Hocko <mhocko@suse.com>, Breno Leitao <leitao@debian.org>
Subject: [PATCH RFC 3/3] workqueue: doc: Document WQ_PREFER_PERCPU
Date: Thu, 26 Nov 2026 16:24:58 +0100 [thread overview]
Message-ID: <20261126152458.742942-4-marco.crivellari@suse.com> (raw)
In-Reply-To: <20261126152458.742942-1-marco.crivellari@suse.com>
WQ_PREFER_PERCPU implies WQ_PERCPU, so its work items run on the queueing
CPU and are concurrency managed. While a CPU is isolated, through
isolcpus=domain or a cgroup v2 isolated partition, the work items queued
on it run on an unbound worker pool on the housekeeping CPUs instead.
Describe the flag next to WQ_PERCPU, with the cases it is meant for:
work that prefers the local CPU for cache locality but doesn't need it
for correctness.
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
Documentation/core-api/workqueue.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/core-api/workqueue.rst b/Documentation/core-api/workqueue.rst
index ef8f613ce402..44349c33e154 100644
--- a/Documentation/core-api/workqueue.rst
+++ b/Documentation/core-api/workqueue.rst
@@ -189,6 +189,14 @@ resources, scheduled and executed.
This flag is the complement of ``WQ_UNBOUND``.
+``WQ_PREFER_PERCPU``
+ Implies ``WQ_PERCPU``: work items run on the queueing CPU and are
+ concurrency managed. While a CPU is isolated, through ``isolcpus=domain``
+ or a cgroup v2 isolated partition, work items queued on it run on an
+ unbound worker pool on the housekeeping CPUs instead. Use it for work
+ that prefers the local CPU for cache locality but doesn't need it for
+ correctness.
+
``WQ_UNBOUND``
Workqueues without ``WQ_PERCPU`` are unbound by default, except for
``WQ_BH`` workqueues, which are always per-CPU.
--
2.56.0
prev parent reply other threads:[~2026-11-26 15:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 15:24 [PATCH RFC 0/3] workqueue: Add WQ_PREFER_PERCPU Marco Crivellari
2026-11-26 15:24 ` [PATCH RFC 1/3] workqueue: Add WQ_PREFER_PERCPU and system_prefer_percpu_wq Marco Crivellari
2026-11-26 15:24 ` [PATCH RFC 2/3] workqueue: Offload WQ_PREFER_PERCPU work from isolated CPUs Marco Crivellari
2026-11-26 15:24 ` Marco Crivellari [this message]
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=20261126152458.742942-4-marco.crivellari@suse.com \
--to=marco.crivellari@suse.com \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@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®