Skip to contentSkip to conversation

Two small patches for workqueue

PATCH In review Ammar Faizi 3 participants 5 messages Feb 26, 2023 – Mar 17, 2023 Workqueue

lore
Share & tools
lore
#0 lore raw

cover Two small patches for workqueue

Two small boring patches for workqueue.

---

Ammar Faizi (2):
workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()
MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry

 MAINTAINERS        | 1 +
 kernel/workqueue.c | 6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)

base-commit: 2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c

Signature · 1 line
Ammar Faizi
#1 lore raw

PATCH 1/2 workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()

Use pr_warn_once() to achieve the same thing. It's simpler.

---
 kernel/workqueue.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
kernel/workqueue.c +2 -4
index b8b541caed4854a4..3f1fabea000f4408 100644
@@ -1392,15 +1392,13 @@ static bool is_chained_work(struct workqueue_struct *wq)
  */
 static int wq_select_unbound_cpu(int cpu)
 {
-	static bool printed_dbg_warning;
 	int new_cpu;
 
 	if (likely(!wq_debug_force_rr_cpu)) {
 		if (cpumask_test_cpu(cpu, wq_unbound_cpumask))
 			return cpu;
-	} else if (!printed_dbg_warning) {
-		pr_warn("workqueue: round-robin CPU selection forced, expect performance impact\n");
-		printed_dbg_warning = true;
+	} else {
+		pr_warn_once("workqueue: round-robin CPU selection forced, expect performance impact\n");
 	}
 
 	if (cpumask_empty(wq_unbound_cpumask))
Signature · 1 line
Ammar Faizi
#3 lore raw

PATCH 2/2 MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry

In reply to Ammar Faizi

This file doesn't have a maintainer. It should belong to the WORKQUEUE entry part. Add it to the WORKQUEUE entry.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index eb223dcf0f62f19d..ec4e40eb58778cc7 100644
@@ -22585,6 +22585,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git
 F:	Documentation/core-api/workqueue.rst
 F:	include/linux/workqueue.h
 F:	kernel/workqueue.c
+F:	kernel/workqueue_internal.h
 
 WWAN DRIVERS
 M:	Loic Poulain <[email protected]>
Signature · 1 line
Ammar Faizi