milos-linux/drivers/target
Martin K. Petersen e360bb6dc8 Merge patch series "replace old wq(s), added WQ_PERCPU to alloc_workqueue"
Marco Crivellari <marco.crivellari@suse.com> says:

Hi,

=== Current situation: problems ===

Let's consider a nohz_full system with isolated CPUs: wq_unbound_cpumask is
set to the housekeeping CPUs, for !WQ_UNBOUND the local CPU is selected.

This leads to different scenarios if a work item is scheduled on an
isolated CPU where "delay" value is 0 or greater then 0:
        schedule_delayed_work(, 0);

This will be handled by __queue_work() that will queue the work item on the
current local (isolated) CPU, while:

        schedule_delayed_work(, 1);

Will move the timer on an housekeeping CPU, and schedule the work there.

Currently if a user enqueue a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.

This lack of consistency cannot be addressed without refactoring the API.

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

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

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

The old workqueues will be removed in a future release cycle.

=== Introduced Changes by this series ===

1) [P 1]  Replace uses of system_wq and system_unbound_wq

    system_unbound_wq is to be used when locality is not required.

    Because of that, system_unbound_wq has been replaced with
	system_dfl_wq, to make clear it should be used when locality
	is not required.

2) [P 2-3-4] WQ_PERCPU added to alloc_workqueue()

    This change adds a new WQ_PERCPU flag to explicitly request
    alloc_workqueue() to be per-cpu when WQ_UNBOUND has not been specified.

Thanks!

Link: https://patch.msgid.link/20251031095643.74246-1-marco.crivellari@suse.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-12 21:30:23 -05:00
..
iscsi scsi: target: iscsi: fix typos and formatting in lio_target messages 2025-09-15 21:54:09 -04:00
loopback scsi: target: tcm_loop: Fix wrong abort tag 2025-03-17 22:04:21 -04:00
sbp scsi: target: sbp: Replace use of system_unbound_wq with system_dfl_wq 2025-11-12 21:28:25 -05:00
tcm_fc scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
tcm_remote
Kconfig
Makefile
target_core_alua.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target_core_alua.h
target_core_configfs.c scsi: target: Simplify target_lu_gp_members_show() 2025-11-02 21:47:29 -05:00
target_core_device.c Merge patch series "target: RW/num_cmds stats improvements" 2025-11-02 22:07:27 -05:00
target_core_fabric_configfs.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_fabric_lib.c scsi: target: core: Generate correct identifiers for PR OUT transport IDs 2025-07-24 21:57:00 -04:00
target_core_file.c scsi: target: Rename target_configure_unmap_from_queue() 2025-11-02 21:40:01 -05:00
target_core_file.h
target_core_hba.c
target_core_iblock.c scsi: target: Add atomic support to target_core_iblock 2025-11-02 21:40:02 -05:00
target_core_iblock.h scsi: target: iblock: Allow iblock devices to be shared 2025-07-24 21:39:01 -04:00
target_core_internal.h scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_pr.c SCSI misc on 20250806 2025-08-06 15:44:25 +03:00
target_core_pr.h
target_core_pscsi.c block: add a bio_init_inline helper 2025-09-09 07:31:59 -06:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c scsi: target: Add WRITE_ATOMIC_16 handler 2025-11-02 21:40:02 -05:00
target_core_spc.c scsi: target: Add WRITE_ATOMIC_16 support to RSOC 2025-11-02 21:40:02 -05:00
target_core_stat.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_tmr.c
target_core_tpg.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_transport.c Merge patch series "replace old wq(s), added WQ_PERCPU to alloc_workqueue" 2025-11-12 21:30:23 -05:00
target_core_ua.c
target_core_ua.h
target_core_user.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
target_core_xcopy.c scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
target_core_xcopy.h