public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
@ 2020-07-03  5:16 Bob Liu
  2020-07-03 18:28 ` Lee Duncan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bob Liu @ 2020-07-03  5:16 UTC (permalink / raw)
  To: linux-scsi
  Cc: open-iscsi, martin.petersen, lduncan, cleech, michael.christie,
	Bob Liu

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


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

* Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
  2020-07-03  5:16 [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy Bob Liu
@ 2020-07-03 18:28 ` Lee Duncan
  2020-07-04  3:59 ` Mike Christie
  2020-07-08  6:06 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Lee Duncan @ 2020-07-03 18:28 UTC (permalink / raw)
  To: Bob Liu, linux-scsi; +Cc: open-iscsi, martin.petersen, cleech, michael.christie

On 7/2/20 10:16 PM, Bob Liu wrote:
> 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;
> 

Reviewed-by: Lee Duncan <lduncan@suse.com>


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

* Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
  2020-07-03  5:16 [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy Bob Liu
  2020-07-03 18:28 ` Lee Duncan
@ 2020-07-04  3:59 ` Mike Christie
  2020-07-05  1:28   ` Lee Duncan
  2020-07-08  6:06 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Mike Christie @ 2020-07-04  3:59 UTC (permalink / raw)
  To: Bob Liu, linux-scsi; +Cc: open-iscsi, martin.petersen, lduncan, cleech

On 7/3/20 12:16 AM, Bob Liu wrote:
> 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;
> 

Reviewed-by: Mike Christie <michael.christie@oracle.com>

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

* Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
  2020-07-04  3:59 ` Mike Christie
@ 2020-07-05  1:28   ` Lee Duncan
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Duncan @ 2020-07-05  1:28 UTC (permalink / raw)
  To: Mike Christie, Bob Liu, linux-scsi; +Cc: open-iscsi, martin.petersen, cleech

On 7/3/20 8:59 PM, Mike Christie wrote:
> On 7/3/20 12:16 AM, Bob Liu wrote:
>> 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;
>>
> 
> Reviewed-by: Mike Christie <michael.christie@oracle.com>
> 

Reviewed-by: Lee Duncan <lduncan@suse.com>


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

* Re: [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy
  2020-07-03  5:16 [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy Bob Liu
  2020-07-03 18:28 ` Lee Duncan
  2020-07-04  3:59 ` Mike Christie
@ 2020-07-08  6:06 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-07-08  6:06 UTC (permalink / raw)
  To: linux-scsi, Bob Liu
  Cc: Martin K . Petersen, michael.christie, lduncan, open-iscsi,
	cleech

On Fri, 3 Jul 2020 13:16:03 +0800, Bob Liu wrote:

> 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".

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: iscsi: Register sysfs for workqueue iscsi_destroy
      https://git.kernel.org/mkp/scsi/c/919a295abf96

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2020-07-08  6:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-03  5:16 [PATCH] scsi: iscsi: register sysfs for workqueue iscsi_destroy Bob Liu
2020-07-03 18:28 ` Lee Duncan
2020-07-04  3:59 ` Mike Christie
2020-07-05  1:28   ` Lee Duncan
2020-07-08  6:06 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox