Workqueues have changed since LDD3 was written.

These two functions are actually macros:

#define create_workqueue(name)                                          \
        alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, (name))
#define create_singlethread_workqueue(name)                             \
        alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1, (name))

The alloc_workqueue documentation says:

Allocate a workqueue with the specified parameters. For detailed information on WQ_* flags, please refer to Documentation/workqueue.txt.

That file is too big to quote entirely, but it says:

alloc_workqueue() allocates a wq. The original create_*workqueue() functions are deprecated and scheduled for removal.
[...]
A wq no longer manages execution resources but serves as a domain for forward progress guarantee, flush and work item attributes.

Answer from CL. on Stack Overflow
🌐
Linux Kernel
docs.kernel.org › core-api › workqueue.html
Workqueue — The Linux Kernel documentation
Some users depend on strict execution ordering where only one work item is in flight at any given time and the work items are processed in queueing order. While the combination of @max_active of 1 and WQ_UNBOUND used to achieve this behavior, this is no longer the case. Use alloc_ordered_workqueue() instead.
🌐
LWN.net
lwn.net › Articles › 403891
Working on workqueues [LWN.net]
In 2.6.36, that interface has been preserved, but the workqueue it creates is a different beast: it has no dedicated threads and really just serves as a context for the submission of tasks. The API is considered deprecated; the proper way to create a workqueue now is with: int alloc_workqueue(char *name, unsigned int flags, int max_active);
🌐
Linux Kernel
kernel.org › doc › html › v4.10 › core-api › workqueue.html
Concurrency Managed Workqueue (cmwq) — The Linux Kernel documentation
They can influence some aspects of the way the work items are executed by setting flags on the workqueue they are putting the work item on. These flags include things like CPU locality, concurrency limits, priority and more. To get a detailed overview refer to the API description of alloc_workqueue() below.
🌐
Linuxfound
events.static.linuxfound.org › sites › events › files › slides › Async execution with wqs.pdf pdf
Async execution with workqueues Bhaktipriya Shridhar
Workqueue API · alloc_workqueue() allocates a wq. Takes in 3 parameters: ➔ · @name · ➔ · @flags · ➔ · @max_active · @name · is the name of the · wq. 1 · @flags · control how work · items are assigned · execution resources, scheduled and · executed. 2 ·
🌐
Linux Kernel
docs.huihoo.com › doxygen › linux › kernel › 3.7 › linux_2workqueue_8h.html
Linux Kernel: include/linux/workqueue.h File Reference
Definition at line 380 of file workqueue.h. ... alloc_workqueue - allocate a workqueue : printf format for the name of the workqueue : WQ_* flags : max in-flight work items, 0 for default : args for
🌐
EmbeTronicX
embetronicx.com › tutorials › linux › device-drivers › work-queue-in-linux-own-workqueue
Workqueue in Linux Kernel Part 3 – Linux Device Driver Tutorial Part 16
October 5, 2022 - Since create_workqueue and create_singlethread_workqueue() are macros. Both are using the alloc_workqueue function in the background.
🌐
Linux Kernel
kernel.org › doc › Documentation › core-api › workqueue.rst
========= Workqueue ========= :Date: September, 2010
All work items which might be used ... free up. Application Programming Interface (API) ======================================= ``alloc_workqueue()`` allocates a wq....
Find elsewhere
🌐
GitHub
github.com › torvalds › linux › blob › master › Documentation › core-api › workqueue.rst
linux/Documentation/core-api/workqueue.rst at master · torvalds/linux
alloc_workqueue() allocates a wq. The original create_*workqueue() functions are deprecated and scheduled for removal. alloc_workqueue() takes three arguments - @name, @flags and @max_active.
Author   torvalds
🌐
Infradead
infradead.org › ~mchehab › kernel_docs › core-api › workqueue.html
Concurrency Managed Workqueue (cmwq) — The Linux Kernel 5.10.0-rc1+ documentation
They can influence some aspects of the way the work items are executed by setting flags on the workqueue they are putting the work item on. These flags include things like CPU locality, concurrency limits, priority and more. To get a detailed overview refer to the API description of alloc_workqueue() below.
🌐
Linux Kernel
linux.kernel.narkive.com › 7q57wjAb › patch-workqueue-make-alloc-workqueue-take-printf-fmt-and-args-for-name
[PATCH] workqueue: make alloc_workqueue() take printf fmt and args for name
Permalink alloc_workqueue() currently expects the passed in @name pointer to remain accessible. This is inconvenient and a bit silly given that the whole wq is being dynamically allocated. This patch updates alloc_workqueue() and friends to take printf format string instead of opaque string and matching varargs at the end.
🌐
Man Pages
manpages.org › alloc_workqueue › 9
man alloc_workqueue (9): allocate a workqueue
man alloc_workqueue (9): Allocate a workqueue with the specified parameters. For detailed information on WQ_* flags, please refer to Documentation/workqueue.txt. The __lock_name macro dance is to guarantee that single lock_class_key doesn't end up with different namesm, which isn
🌐
Linux Kernel
linux.kernel.narkive.com › KKLixETY › patch-iwlwifi-dvm-convert-create-singlethread-workqueue-to-alloc-workqueue
[PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue()
Permalink Use alloc_workqueue() to allocate the workqueue instead of create_singlethread_workqueue() since the latter is deprecated and is scheduled for removal.
🌐
GitHub
github.com › torvalds › linux › blob › master › kernel › workqueue.c
linux/kernel/workqueue.c at master · torvalds/linux
system_dfl_wq = alloc_workqueue("events_unbound", WQ_UNBOUND, WQ_MAX_ACTIVE);
Author   torvalds
🌐
Uc
gauss.ececs.uc.edu › Courses › c4029 › doc › workqueue.html
Work_queue
The original create_*workqueue() functions are deprecated and scheduled for removal. alloc_workqueue() takes three arguments - @name, @flags and @max_active. @name is the name of the wq and also used as the name of the rescuer thread if there is one. A wq no longer manages execution resources but serves as a domain for forward progress guarantee, flush and work item attributes.
🌐
Linux Kernel Newbies
kernelnewbies.org › Tejun_Heo
Tejun_Heo - Linux Kernel Newbies
December 30, 2017 - alloc_workqueue() with the minimal attributes specified.
🌐
Mjmwired
mjmwired.net › kernel › Documentation › workqueue.txt
Linux Kernel Documentation :: workqueue.txt
December 21, 2016 - All work items which might be used 148 on code paths that handle memory reclaim are required to be queued on 149 wq's that have a rescue-worker reserved for execution under memory 150 pressure. Else it is possible that the worker-pool deadlocks waiting 151 for execution contexts to free up. 152 153 154 4. Application Programming Interface (API) 155 156 alloc_workqueue() allocates a wq.
🌐
GitHub
github.com › torvalds › linux › blob › master › include › linux › workqueue.h
linux/include/linux/workqueue.h at master · torvalds/linux
void workqueue_softirq_dead(unsigned int cpu); · /** * alloc_workqueue - allocate a workqueue · * @fmt: printf format for the name of the workqueue · * @flags: WQ_* flags · * @max_active: max in-flight work items, 0 for default · * @...: args for @fmt ·
Author   torvalds