public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: linux-scsi@vger.kernel.org
Cc: open-iscsi@googlegroups.com, martin.petersen@oracle.com,
	lduncan@suse.com, cleech@redhat.com, michael.christie@oracle.com,
	Bob Liu <bob.liu@oracle.com>
Subject: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
Date: Fri,  3 Jul 2020 13:16:03 +0800	[thread overview]
Message-ID: <20200703051603.1473-1-bob.liu@oracle.com> (raw)

Register sysfs for workqueue iscsi_destroy, so that users can set cpu affinity
through "cpumask" for this workqueue to get better isolation in cloud
multi-tenant scenario.

This patch unfolded create_singlethread_workqueue(), added WQ_SYSFS and drop
__WQ_ORDERED_EXPLICIT since __WQ_ORDERED_EXPLICIT workqueue isn't allowed to
change "cpumask".

Suggested-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
 drivers/scsi/scsi_transport_iscsi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 7ae5024..aa8d4a3 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4766,7 +4766,9 @@ static __init int iscsi_transport_init(void)
 		goto release_nls;
 	}
 
-	iscsi_destroy_workq = create_singlethread_workqueue("iscsi_destroy");
+	iscsi_destroy_workq = alloc_workqueue("%s",
+			WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
+			1, "iscsi_destroy");
 	if (!iscsi_destroy_workq) {
 		err = -ENOMEM;
 		goto destroy_wq;
-- 
2.9.5


             reply	other threads:[~2020-07-03  5:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  5:16 Bob Liu [this message]
2020-07-03 18:28 ` [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy Lee Duncan
2020-07-04  3:59 ` Mike Christie
2020-07-05  1:28   ` Lee Duncan
2020-07-08  6:06 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703051603.1473-1-bob.liu@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=cleech@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=open-iscsi@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox