mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users
@ 2026-01-13 14:57 Marco Crivellari
  2026-01-13 14:57 ` [PATCH 1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users Marco Crivellari
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Marco Crivellari @ 2026-01-13 14:57 UTC (permalink / raw)
  To: linux-kernel, linux-scsi
  Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
	Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen

Hi,

This series continues the effort to refactor the Workqueue API.
No behavior changes are introduced by this series.

=== Recent changes to the WQ API ===

The following, address the recent changes in the Workqueue API:

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

The old workqueues will be removed in a future release cycle and
unbound will become the implicit default.

=== Introduced Changes by this series ===

1) [P 1-2-3] add WQ_PERCPU to  alloc_workqueue() users

    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.

    WQ_UNBOUND will be removed in future.


For more information:
    https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/


Thanks!

Marco Crivellari (3):
  scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users
  scsi: qla2xxx: add WQ_PERCPU to alloc_workqueue users
  scsi: qla2xxx: target: add WQ_PERCPU to alloc_workqueue users

 drivers/scsi/qla2xxx/qla_target.c  | 2 +-
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 drivers/scsi/qla4xxx/ql4_os.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.52.0


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

* [PATCH 1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users
  2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
@ 2026-01-13 14:57 ` Marco Crivellari
  2026-01-13 14:57 ` [PATCH 2/3] scsi: qla2xxx: " Marco Crivellari
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Marco Crivellari @ 2026-01-13 14:57 UTC (permalink / raw)
  To: linux-kernel, linux-scsi
  Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
	Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen

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.

Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 97329c97332f..125967e5c548 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8819,7 +8819,7 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
 	}
 	INIT_WORK(&ha->dpc_work, qla4xxx_do_dpc);
 
-	ha->task_wq = alloc_workqueue("qla4xxx_%lu_task", WQ_MEM_RECLAIM, 1,
+	ha->task_wq = alloc_workqueue("qla4xxx_%lu_task", WQ_MEM_RECLAIM | WQ_PERCPU, 1,
 				      ha->host_no);
 	if (!ha->task_wq) {
 		ql4_printk(KERN_WARNING, ha, "Unable to start task thread!\n");
-- 
2.52.0


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

* [PATCH 2/3] scsi: qla2xxx: add WQ_PERCPU to alloc_workqueue users
  2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
  2026-01-13 14:57 ` [PATCH 1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users Marco Crivellari
@ 2026-01-13 14:57 ` Marco Crivellari
  2026-01-13 14:57 ` [PATCH 3/3] scsi: qla2xxx: target: " Marco Crivellari
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Marco Crivellari @ 2026-01-13 14:57 UTC (permalink / raw)
  To: linux-kernel, linux-scsi
  Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
	Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen

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.

Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 2fff68935338..b00ae7a664da 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -1901,7 +1901,7 @@ static int tcm_qla2xxx_register_configfs(void)
 		goto out_fabric;
 
 	tcm_qla2xxx_free_wq = alloc_workqueue("tcm_qla2xxx_free",
-						WQ_MEM_RECLAIM, 0);
+						WQ_MEM_RECLAIM | WQ_PERCPU, 0);
 	if (!tcm_qla2xxx_free_wq) {
 		ret = -ENOMEM;
 		goto out_fabric_npiv;
-- 
2.52.0


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

* [PATCH 3/3] scsi: qla2xxx: target: add WQ_PERCPU to alloc_workqueue users
  2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
  2026-01-13 14:57 ` [PATCH 1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users Marco Crivellari
  2026-01-13 14:57 ` [PATCH 2/3] scsi: qla2xxx: " Marco Crivellari
@ 2026-01-13 14:57 ` Marco Crivellari
  2026-01-24  3:25 ` [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Martin K. Petersen
  2026-02-04  3:52 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Marco Crivellari @ 2026-01-13 14:57 UTC (permalink / raw)
  To: linux-kernel, linux-scsi
  Cc: Tejun Heo, Lai Jiangshan, Frederic Weisbecker,
	Sebastian Andrzej Siewior, Marco Crivellari, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen

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.

Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
 drivers/scsi/qla2xxx/qla_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index d772136984c9..ef3a5fac2b48 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -8390,7 +8390,7 @@ int __init qlt_init(void)
 		goto out_plogi_cachep;
 	}
 
-	qla_tgt_wq = alloc_workqueue("qla_tgt_wq", 0, 0);
+	qla_tgt_wq = alloc_workqueue("qla_tgt_wq", WQ_PERCPU, 0);
 	if (!qla_tgt_wq) {
 		ql_log(ql_log_fatal, NULL, 0xe06f,
 		    "alloc_workqueue for qla_tgt_wq failed\n");
-- 
2.52.0


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

* Re: [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users
  2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
                   ` (2 preceding siblings ...)
  2026-01-13 14:57 ` [PATCH 3/3] scsi: qla2xxx: target: " Marco Crivellari
@ 2026-01-24  3:25 ` Martin K. Petersen
  2026-02-04  3:52 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2026-01-24  3:25 UTC (permalink / raw)
  To: Marco Crivellari
  Cc: linux-kernel, linux-scsi, Tejun Heo, Lai Jiangshan,
	Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen


Marco,

> This series continues the effort to refactor the Workqueue API.
> No behavior changes are introduced by this series.

Applied to 6.20/scsi-staging, thanks!

-- 
Martin K. Petersen

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

* Re: [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users
  2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
                   ` (3 preceding siblings ...)
  2026-01-24  3:25 ` [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Martin K. Petersen
@ 2026-02-04  3:52 ` Martin K. Petersen
  2026-02-04  9:54   ` Marco Crivellari
  4 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2026-02-04  3:52 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, Marco Crivellari
  Cc: Martin K . Petersen, Tejun Heo, Lai Jiangshan,
	Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley

On Tue, 13 Jan 2026 15:57:08 +0100, Marco Crivellari wrote:

> This series continues the effort to refactor the Workqueue API.
> No behavior changes are introduced by this series.
> 
> === Recent changes to the WQ API ===
> 
> The following, address the recent changes in the Workqueue API:
> 
> [...]

Applied to 6.20/scsi-queue, thanks!

[1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users
      https://git.kernel.org/mkp/scsi/c/267345b6d1dc
[2/3] scsi: qla2xxx: add WQ_PERCPU to alloc_workqueue users
      https://git.kernel.org/mkp/scsi/c/e4c7c844fae0
[3/3] scsi: qla2xxx: target: add WQ_PERCPU to alloc_workqueue users
      https://git.kernel.org/mkp/scsi/c/e6b42979ea61

-- 
Martin K. Petersen

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

* Re: [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users
  2026-02-04  3:52 ` Martin K. Petersen
@ 2026-02-04  9:54   ` Marco Crivellari
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Crivellari @ 2026-02-04  9:54 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: linux-kernel, linux-scsi, Tejun Heo, Lai Jiangshan,
	Frederic Weisbecker, Sebastian Andrzej Siewior, Michal Hocko,
	Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley

On Wed, Feb 4, 2026 at 4:53 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
> [...]
> Applied to 6.20/scsi-queue, thanks!
>
> [1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users
>       https://git.kernel.org/mkp/scsi/c/267345b6d1dc
> [2/3] scsi: qla2xxx: add WQ_PERCPU to alloc_workqueue users
>       https://git.kernel.org/mkp/scsi/c/e4c7c844fae0
> [3/3] scsi: qla2xxx: target: add WQ_PERCPU to alloc_workqueue users
>       https://git.kernel.org/mkp/scsi/c/e6b42979ea61
>
> --
> Martin K. Petersen

Many thanks Martin!

-- 

Marco Crivellari

L3 Support Engineer

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

end of thread, other threads:[~2026-02-04  9:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-13 14:57 [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Marco Crivellari
2026-01-13 14:57 ` [PATCH 1/3] scsi: qla4xxx: add WQ_PERCPU to alloc_workqueue users Marco Crivellari
2026-01-13 14:57 ` [PATCH 2/3] scsi: qla2xxx: " Marco Crivellari
2026-01-13 14:57 ` [PATCH 3/3] scsi: qla2xxx: target: " Marco Crivellari
2026-01-24  3:25 ` [PATCH 0/3] Add WQ_PERCPU to alloc_workqueue() users Martin K. Petersen
2026-02-04  3:52 ` Martin K. Petersen
2026-02-04  9:54   ` Marco Crivellari

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

all inboxes | Powered by JetHome®