Skip to content

Commit 0ba2fc7

Browse files
DispatchCodemartinkpetersen
authored andcommitted
scsi: target: sbp: Replace use of system_unbound_wq with system_dfl_wq
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 consistentcy cannot be addressed without refactoring the API. This patch continues the effort to refactor worqueue APIs, which has begun with the change introducing new workqueues and a new alloc_workqueue flag: commit 128ea9f ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea ("workqueue: Add new WQ_PERCPU flag") system_dfl_wq should be the default workqueue so as not to enforce locality constraints for random work whenever it's not required. The old system_unbound_wq will be kept for a few release cycles. Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com> Link: https://patch.msgid.link/20251104104518.102130-1-marco.crivellari@suse.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent cd87aa2 commit 0ba2fc7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/target/sbp/sbp_target.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ static int tgt_agent_rw_orb_pointer(struct fw_card *card, int tcode, void *data,
730730
pr_debug("tgt_agent ORB_POINTER write: 0x%llx\n",
731731
agent->orb_pointer);
732732

733-
queue_work(system_unbound_wq, &agent->work);
733+
queue_work(system_dfl_wq, &agent->work);
734734

735735
return RCODE_COMPLETE;
736736

@@ -764,7 +764,7 @@ static int tgt_agent_rw_doorbell(struct fw_card *card, int tcode, void *data,
764764

765765
pr_debug("tgt_agent DOORBELL\n");
766766

767-
queue_work(system_unbound_wq, &agent->work);
767+
queue_work(system_dfl_wq, &agent->work);
768768

769769
return RCODE_COMPLETE;
770770

@@ -990,7 +990,7 @@ static void tgt_agent_fetch_work(struct work_struct *work)
990990

991991
if (tgt_agent_check_active(agent) && !doorbell) {
992992
INIT_WORK(&req->work, tgt_agent_process_work);
993-
queue_work(system_unbound_wq, &req->work);
993+
queue_work(system_dfl_wq, &req->work);
994994
} else {
995995
/* don't process this request, just check next_ORB */
996996
sbp_free_request(req);
@@ -1618,7 +1618,7 @@ static void sbp_mgt_agent_rw(struct fw_card *card,
16181618
agent->orb_offset = sbp2_pointer_to_addr(ptr);
16191619
agent->request = req;
16201620

1621-
queue_work(system_unbound_wq, &agent->work);
1621+
queue_work(system_dfl_wq, &agent->work);
16221622
rcode = RCODE_COMPLETE;
16231623
} else if (tcode == TCODE_READ_BLOCK_REQUEST) {
16241624
addr_to_sbp2_pointer(agent->orb_offset, ptr);

0 commit comments

Comments
 (0)