[PATCH RFC 3/3] workqueue: doc: Document WQ_PREFER_PERCPU

From: Marco Crivellari

Date: Thu Nov 26 2026 - 10:25:19 EST


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@xxxxxxxx>
---
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