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: commit128ea9f6cc("workqueue: Add system_percpu_wq and system_dfl_wq") commit930c2ea566("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>
This commit is contained in:
committed by
Martin K. Petersen
parent
cd87aa2e50
commit
0ba2fc767a
@@ -730,7 +730,7 @@ static int tgt_agent_rw_orb_pointer(struct fw_card *card, int tcode, void *data,
|
||||
pr_debug("tgt_agent ORB_POINTER write: 0x%llx\n",
|
||||
agent->orb_pointer);
|
||||
|
||||
queue_work(system_unbound_wq, &agent->work);
|
||||
queue_work(system_dfl_wq, &agent->work);
|
||||
|
||||
return RCODE_COMPLETE;
|
||||
|
||||
@@ -764,7 +764,7 @@ static int tgt_agent_rw_doorbell(struct fw_card *card, int tcode, void *data,
|
||||
|
||||
pr_debug("tgt_agent DOORBELL\n");
|
||||
|
||||
queue_work(system_unbound_wq, &agent->work);
|
||||
queue_work(system_dfl_wq, &agent->work);
|
||||
|
||||
return RCODE_COMPLETE;
|
||||
|
||||
@@ -990,7 +990,7 @@ static void tgt_agent_fetch_work(struct work_struct *work)
|
||||
|
||||
if (tgt_agent_check_active(agent) && !doorbell) {
|
||||
INIT_WORK(&req->work, tgt_agent_process_work);
|
||||
queue_work(system_unbound_wq, &req->work);
|
||||
queue_work(system_dfl_wq, &req->work);
|
||||
} else {
|
||||
/* don't process this request, just check next_ORB */
|
||||
sbp_free_request(req);
|
||||
@@ -1618,7 +1618,7 @@ static void sbp_mgt_agent_rw(struct fw_card *card,
|
||||
agent->orb_offset = sbp2_pointer_to_addr(ptr);
|
||||
agent->request = req;
|
||||
|
||||
queue_work(system_unbound_wq, &agent->work);
|
||||
queue_work(system_dfl_wq, &agent->work);
|
||||
rcode = RCODE_COMPLETE;
|
||||
} else if (tcode == TCODE_READ_BLOCK_REQUEST) {
|
||||
addr_to_sbp2_pointer(agent->orb_offset, ptr);
|
||||
|
||||
Reference in New Issue
Block a user