scst: Expand all create*_workqueue() invocations

The workqueue maintainer wants to remove the create*_workqueue() macros
because these macros always set the WQ_MEM_RECLAIM flag and because these
only support literal workqueue names. Hence this patch that replaces the
create*_workqueue() invocations with the definition of this macro. The
WQ_MEM_RECLAIM flag has been retained because I think that flag is necessary
for workqueues created by storage drivers.
This commit is contained in:
Gleb Chesnokov
2024-11-07 14:02:05 +03:00
parent 31eca7eced
commit 61f365f96e
4 changed files with 7 additions and 6 deletions
+1 -2
View File
@@ -979,8 +979,7 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev)
snprintf(wq_name, sizeof(wq_name), "isert_cq_%p", cq_desc);
cq_desc->cq_workqueue = alloc_workqueue(wq_name,
WQ_CPU_INTENSIVE|
WQ_MEM_RECLAIM, 1);
WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 1);
if (unlikely(!cq_desc->cq_workqueue)) {
PRINT_ERROR("Failed to alloc iser cq work queue for dev:%s",
ib_dev->name);
+4 -2
View File
@@ -3568,11 +3568,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
if (IS_QLA8031(ha) || IS_MCTP_CAPABLE(ha)) {
sprintf(wq_name, "qla2xxx_%lu_dpc_lp_wq", base_vha->host_no);
ha->dpc_lp_wq = create_singlethread_workqueue(wq_name);
ha->dpc_lp_wq =
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, wq_name);
INIT_WORK(&ha->idc_aen, qla83xx_service_idc_aen);
sprintf(wq_name, "qla2xxx_%lu_dpc_hp_wq", base_vha->host_no);
ha->dpc_hp_wq = create_singlethread_workqueue(wq_name);
ha->dpc_hp_wq =
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, wq_name);
INIT_WORK(&ha->nic_core_reset, qla83xx_nic_core_reset_work);
INIT_WORK(&ha->idc_state_handler,
qla83xx_idc_state_handler_work);
+1 -1
View File
@@ -1480,7 +1480,7 @@ create_st_wq(const char *fmt, ...)
name = kvasprintf(GFP_KERNEL, fmt, ap);
va_end(ap);
if (name)
wq = create_singlethread_workqueue(name);
wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, name);
kfree(name);
return wq;
}
+1 -1
View File
@@ -1791,7 +1791,7 @@ static int __init scst_local_init(void)
* We don't expect much work on this queue, so only create a
* single thread workqueue rather than one on each core.
*/
aen_workqueue = create_singlethread_workqueue("scstlclaen");
aen_workqueue = alloc_ordered_workqueue("scstlclaen", WQ_MEM_RECLAIM);
if (!aen_workqueue) {
PRINT_ERROR("%s", "Unable to create scst_local workqueue");
goto tgt_templ_unreg;