Skip to content

Commit 3ce4196

Browse files
Bob Liumartinkpetersen
authored andcommitted
scsi: iscsi: Register sysfs for iscsi workqueue
This patch enables setting cpu affinity through "cpumask" for iscsi workqueues (iscsi_q_xx and iscsi_eh), so as to get performance isolation. The max number of active worker was changed form 1 to 2, because "cpumask" of ordered workqueue isn't allowed to change. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Lee Duncan <[email protected]> Signed-off-by: Bob Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b6ff8ca commit 3ce4196

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/scsi/libiscsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,9 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
26272627
if (xmit_can_sleep) {
26282628
snprintf(ihost->workq_name, sizeof(ihost->workq_name),
26292629
"iscsi_q_%d", shost->host_no);
2630-
ihost->workq = create_singlethread_workqueue(ihost->workq_name);
2630+
ihost->workq = alloc_workqueue("%s",
2631+
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
2632+
2, ihost->workq_name);
26312633
if (!ihost->workq)
26322634
goto free_host;
26332635
}

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4728,7 +4728,9 @@ static __init int iscsi_transport_init(void)
47284728
goto unregister_flashnode_bus;
47294729
}
47304730

4731-
iscsi_eh_timer_workq = create_singlethread_workqueue("iscsi_eh");
4731+
iscsi_eh_timer_workq = alloc_workqueue("%s",
4732+
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
4733+
2, "iscsi_eh");
47324734
if (!iscsi_eh_timer_workq) {
47334735
err = -ENOMEM;
47344736
goto release_nls;

0 commit comments

Comments
 (0)