2023-02-26 16:53:47

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH v1 0/2] Two small patches for workqueue

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



2023-02-26 16:53:49

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH v1 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.

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


2023-02-26 16:53:53

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH v1 2/2] MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry

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


2023-03-02 02:12:59

by Lai Jiangshan

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()

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

2023-03-17 21:50:46

by Tejun Heo

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] Two small patches for workqueue

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