Skip to contentSkip to conversation

mm-add-wq_percpu-to-alloc_workqueue-users.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 31

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: add WQ_PERCPU to alloc_workqueue users
has been removed from the -mm tree. Its filename was
mm-add-wq_percpu-to-alloc_workqueue-users.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Marco Crivellari <[email protected]>
Subject: mm: add WQ_PERCPU to alloc_workqueue users
Date: Tue, 13 Jan 2026 12:46:30 +0100

This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in:

commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag")

The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn't explicitly specify WQ_UNBOUND must now use WQ_PERCPU. For more details see the Link tag below.

In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU.

[[email protected]: fix mm/slub.c]
[[email protected]: fix kmem_cache_init_late() properly, per Sebastian]
Cc Alexander Potapenko <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Lai jiangshan <[email protected]>
Cc "Liam R. Howlett" <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Marco Elver <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Muchun Song <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 mm/backing-dev.c |    2 +-
 mm/slub.c        |    3 ++-
 mm/vmstat.c      |    3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)
mm/backing-dev.c renamed from mm/backing-dev.c~mm-add-wq_percpu-to-alloc_workqueue-users +1 -1
@@ -974,7 +974,7 @@ static int __init cgwb_init(void)
 	 * system_percpu_wq.  Put them in a separate wq and limit concurrency.
 	 * There's no point in executing many of these in parallel.
 	 */
-	cgwb_release_wq = alloc_workqueue("cgwb_release", 0, 1);
+	cgwb_release_wq = alloc_workqueue("cgwb_release", WQ_PERCPU, 1);
 	if (!cgwb_release_wq)
 		return -ENOMEM;
 
mm/slub.c renamed from mm/slub.c~mm-add-wq_percpu-to-alloc_workqueue-users +2 -1
@@ -8542,7 +8542,8 @@ void __init kmem_cache_init(void)
 
 void __init kmem_cache_init_late(void)
 {
-	flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM, 0);
+	flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM | WQ_PERCPU,
+				  0);
 	WARN_ON(!flushwq);
 }
 
mm/vmstat.c renamed from mm/vmstat.c~mm-add-wq_percpu-to-alloc_workqueue-users +2 -1
@@ -2259,7 +2259,8 @@ void __init init_mm_internals(void)
 {
 	int ret __maybe_unused;
 
-	mm_percpu_wq = alloc_workqueue("mm_percpu_wq", WQ_MEM_RECLAIM, 0);
+	mm_percpu_wq = alloc_workqueue("mm_percpu_wq",
+				       WQ_MEM_RECLAIM | WQ_PERCPU, 0);
 
 #ifdef CONFIG_SMP
 	ret = cpuhp_setup_state_nocalls(CPUHP_MM_VMSTAT_DEAD, "mm/vmstat:dead",

_

Patches currently in -mm which might be from [email protected] are