public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Two small patches for workqueue
@ 2023-02-26 16:53 Ammar Faizi
  2023-02-26 16:53 ` [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Ammar Faizi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-02-26 16:53 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Ammar Faizi, Lai Jiangshan, Linux Kernel Mailing List,
	GNU/Weeb Mailing List

Two small boring patches for workqueue.

Signed-off-by: Ammar Faizi <[email protected]>
---

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
-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()
  2023-02-26 16:53 [PATCH v1 0/2] Two small patches for workqueue Ammar Faizi
@ 2023-02-26 16:53 ` Ammar Faizi
  2023-03-02  2:12   ` Lai Jiangshan
  2023-02-26 16:53 ` [PATCH v1 2/2] MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry Ammar Faizi
  2023-03-17 21:49 ` [PATCH v1 0/2] Two small patches for workqueue Tejun Heo
  2 siblings, 1 reply; 5+ messages in thread
From: Ammar Faizi @ 2023-02-26 16:53 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Ammar Faizi, Lai Jiangshan, Linux Kernel Mailing List,
	GNU/Weeb Mailing List

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

Signed-off-by: Ammar Faizi <[email protected]>
---
 kernel/workqueue.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index b8b541caed4854a4..3f1fabea000f4408 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -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))
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v1 2/2] MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry
  2023-02-26 16:53 [PATCH v1 0/2] Two small patches for workqueue Ammar Faizi
  2023-02-26 16:53 ` [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Ammar Faizi
@ 2023-02-26 16:53 ` Ammar Faizi
  2023-03-17 21:49 ` [PATCH v1 0/2] Two small patches for workqueue Tejun Heo
  2 siblings, 0 replies; 5+ messages in thread
From: Ammar Faizi @ 2023-02-26 16:53 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Ammar Faizi, Lai Jiangshan, Linux Kernel Mailing List,
	GNU/Weeb Mailing List

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

Signed-off-by: Ammar Faizi <[email protected]>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index eb223dcf0f62f19d..ec4e40eb58778cc7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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]>
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()
  2023-02-26 16:53 ` [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Ammar Faizi
@ 2023-03-02  2:12   ` Lai Jiangshan
  0 siblings, 0 replies; 5+ messages in thread
From: Lai Jiangshan @ 2023-03-02  2:12 UTC (permalink / raw)
  To: Ammar Faizi; +Cc: Tejun Heo, Linux Kernel Mailing List, GNU/Weeb Mailing List

On Mon, Feb 27, 2023 at 12:53 AM Ammar Faizi <[email protected]> wrote:
>
> Use pr_warn_once() to achieve the same thing. It's simpler.
>
> Signed-off-by: Ammar Faizi <[email protected]>
> ---

For both of the patches

Reviewed-by: Lai Jiangshan <[email protected]>

Thanks
Lai

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 0/2] Two small patches for workqueue
  2023-02-26 16:53 [PATCH v1 0/2] Two small patches for workqueue Ammar Faizi
  2023-02-26 16:53 ` [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Ammar Faizi
  2023-02-26 16:53 ` [PATCH v1 2/2] MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry Ammar Faizi
@ 2023-03-17 21:49 ` Tejun Heo
  2 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2023-03-17 21:49 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: Lai Jiangshan, Linux Kernel Mailing List, GNU/Weeb Mailing List

On Sun, Feb 26, 2023 at 11:53:19PM +0700, Ammar Faizi wrote:
> Two small boring patches for workqueue.
> 
> Signed-off-by: Ammar Faizi <[email protected]>

Applied 1-2 to wq/for-6.4.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-17 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 16:53 [PATCH v1 0/2] Two small patches for workqueue Ammar Faizi
2023-02-26 16:53 ` [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Ammar Faizi
2023-03-02  2:12   ` Lai Jiangshan
2023-02-26 16:53 ` [PATCH v1 2/2] MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry Ammar Faizi
2023-03-17 21:49 ` [PATCH v1 0/2] Two small patches for workqueue Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox