[PATCH 1/2] scsi: iscsi: change back iscsi workqueue max_active argu to 1

7 views
Skip to first unread message

Bob Liu

unread,
Jun 30, 2020, 11:08:44 PM6/30/20
to linux...@vger.kernel.org, martin....@oracle.com, open-...@googlegroups.com, ldu...@suse.com, michael....@oracle.com, Bob Liu
Commit 3ce4196 (scsi: iscsi: Register sysfs for iscsi workqueue) enables
'cpumask' support for iscsi workqueues.

While there is a mistake in that commit, it's unnecessary to set
max_active = 2 since 'cpumask' can be modified when max_active = 1.

This patch change back max_active to 1 so as to keep the same behaviour as
before.

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

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index e5a64d4..49c8a18 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2629,7 +2629,7 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
"iscsi_q_%d", shost->host_no);
ihost->workq = alloc_workqueue("%s",
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
- 2, ihost->workq_name);
+ 1, 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 f4cc08e..7ae5024 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4760,7 +4760,7 @@ static __init int iscsi_transport_init(void)

iscsi_eh_timer_workq = alloc_workqueue("%s",
WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
- 2, "iscsi_eh");
+ 1, "iscsi_eh");
if (!iscsi_eh_timer_workq) {
err = -ENOMEM;
goto release_nls;
--
2.9.5

Mike Christie

unread,
Jul 1, 2020, 11:28:30 AM7/1/20
to Bob Liu, linux...@vger.kernel.org, martin....@oracle.com, open-...@googlegroups.com, ldu...@suse.com
Reviewed-by: Mike Christie <michael....@oracle.com>

I think it should get it into 5.8 to fix the bug I mentioned in the other thread.

For 5.9, you'll want to send another patch to update the iscsi_destroy_workq that got added in 5.8.

scsi_transport_iscsi.c:

iscsi_destroy_workq = create_singlethread_workqueue("iscsi_destroy");

Martin K. Petersen

unread,
Jul 3, 2020, 12:05:05 AM7/3/20
to Bob Liu, linux...@vger.kernel.org, Martin K . Petersen, ldu...@suse.com, michael....@oracle.com, open-...@googlegroups.com
On Wed, 1 Jul 2020 11:07:44 +0800, Bob Liu wrote:

> Commit 3ce4196 (scsi: iscsi: Register sysfs for iscsi workqueue) enables
> 'cpumask' support for iscsi workqueues.
>
> While there is a mistake in that commit, it's unnecessary to set
> max_active = 2 since 'cpumask' can be modified when max_active = 1.
>
> This patch change back max_active to 1 so as to keep the same behaviour as
> before.

Applied to 5.8/scsi-fixes, thanks!

[1/2] scsi: iscsi: Change iSCSI workqueue max_active back to 1
https://git.kernel.org/mkp/scsi/c/1a9826204109

--
Martin K. Petersen Oracle Linux Engineering
Reply all
Reply to author
Forward
0 new messages