All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: iscsi: register sysfs for iscsi workqueue
@ 2020-04-16  2:25 Bob Liu
  2020-04-17  3:23   ` kernel test robot
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Liu @ 2020-04-16  2:25 UTC (permalink / raw)
  To: linux-scsi; +Cc: martin.petersen, Bob Liu

Then users can set cpu affinity through "cpumask" for iscsi workqueues, so
as to get performance isolation.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
 drivers/scsi/libiscsi.c             | 4 +++-
 drivers/scsi/scsi_transport_iscsi.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 70b99c0..588c68a 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2627,7 +2627,9 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
 	if (xmit_can_sleep) {
 		snprintf(ihost->workq_name, sizeof(ihost->workq_name),
 			"iscsi_q_%d", shost->host_no);
-		ihost->workq = create_singlethread_workqueue(ihost->workq_name);
+		ihost->workq = alloc_ordered_workqueue("%s",
+				WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM,
+				ihost->workq_name);
 		if (!ihost->workq)
 			goto free_host;
 	}
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index dfc726f..1370dd7 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4602,7 +4602,8 @@ static __init int iscsi_transport_init(void)
 		goto unregister_flashnode_bus;
 	}
 
-	iscsi_eh_timer_workq = create_singlethread_workqueue("iscsi_eh");
+	iscsi_eh_timer_workq = alloc_ordered_workqueue("%s",
+			WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM, "iscsi_eh");
 	if (!iscsi_eh_timer_workq) {
 		err = -ENOMEM;
 		goto release_nls;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-17  4:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-16  2:25 [PATCH] scsi: iscsi: register sysfs for iscsi workqueue Bob Liu
2020-04-17  3:23 ` [scsi] a2ab7a1a38: WARNING:at_kernel/workqueue.c:#workqueue_sysfs_register kernel test robot
2020-04-17  3:23   ` kernel test robot
2020-04-17  4:58   ` Bob Liu
2020-04-17  4:58     ` Bob Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.