Skip to contentSkip to conversation

workqueue: Rename rescuer kworker

PATCH Applied Aaron Tomlin 2 participants 4 messages Aug 8, 2023 – Aug 17, 2023 Workqueue

lore
Share & tools
lore
#0 lore raw

v2 cover workqueue: Rename rescuer kworker

Each CPU-specific and unbound kworker kthread conforms to a particular naming scheme. However, this does not extend to the rescuer kworker. At present, a rescuer kworker is simply named according to its workqueue's name. This can be cryptic.

This patch modifies a rescuer to follow the kworker naming scheme. The "r" is indicative of a rescuer and after "-" is its workqueue's name e.g. "kworker/r-ext4-rsv-conver".

--
Changes since v1 [1]:
- Remove CPU affinity comment about the kworker (Tejun Heo)

[1]: https://lore.kernel.org/lkml/[email protected]/
--

Aaron Tomlin (1):
workqueue: Rename rescuer kworker

 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.39.1
#1 lore raw

PATCH v2 1/1 workqueue: Rename rescuer kworker

Each CPU-specific and unbound kworker kthread conforms to a particular naming scheme. However, this does not extend to the rescuer kworker. At present, a rescuer kworker is simply named according to its workqueue's name. This can be cryptic.

This patch modifies a rescuer to follow the kworker naming scheme. The "r" is indicative of a rescuer and after "-" is its workqueue's name e.g. "kworker/r-ext4-rsv-conver".

---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/workqueue.c +1 -1
index 02a8f402eeb5..d9bb375b8d02 100644
@@ -4599,7 +4599,7 @@ static int init_rescuer(struct workqueue_struct *wq)
 	}
 
 	rescuer->rescue_wq = wq;
-	rescuer->task = kthread_create(rescuer_thread, rescuer, "%s", wq->name);
+	rescuer->task = kthread_create(rescuer_thread, rescuer, "kworker/r-%s", wq->name);
 	if (IS_ERR(rescuer->task)) {
 		ret = PTR_ERR(rescuer->task);
 		pr_err("workqueue: Failed to create a rescuer kthread for wq \"%s\": %pe",
Signature · 1 line
2.39.1
maintainer Applied
#2 lore raw
Quoted 10 lines · Aaron Tomlin

Each CPU-specific and unbound kworker kthread conforms to a particular naming scheme. However, this does not extend to the rescuer kworker. At present, a rescuer kworker is simply named according to its workqueue's name. This can be cryptic.

This patch modifies a rescuer to follow the kworker naming scheme. The "r" is indicative of a rescuer and after "-" is its workqueue's name e.g. "kworker/r-ext4-rsv-conver".

Applied to wq/for-6.6 with prefix "r" replaced with "R" to make it more distinct and consistent with how highpri pools are marked.

Thanks.

Signature · 1 line
tejun
#3 lore raw
Quoted 2 lines

Applied to wq/for-6.6 with prefix "r" replaced with "R" to make it more distinct and consistent with how highpri pools are marked.

Hi Tejun,

Thank you.

Kind regards,

Signature · 1 line
Aaron Tomlin