Re: Patch: Make the iscsi lld create a WQ_HIGHPRI workqueue itself

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/28/2016 03:46 PM, Richard Sharpe wrote:
> Hi folks,
> 
> We noticed recently while testing with large numbers of iSCSI
> connections that iscsid was going to heroic lengths to change the nice
> value of the iSCSI work queue to -20. It becomes very expensive with
> hundreds of connections.
> 
> This small patch has the LLD do the work,
> 
> Feedback welcome.
> 
> A small patch will be needed for the user-space tools as well. I will
> send one in if someone else does not do so.
> 
> -- Regards, Richard Sharpe (何以解憂?唯有杜康。--曹操)
> 
> 
> 0001-Make-the-iscsi-lld-create-a-WQ_HIGHPRI-workqueue.patch
> 
> 
> From c0f04a66b29a9190109740c03ee9e65bb62afe28 Mon Sep 17 00:00:00 2001
> From: Richard Sharpe <rsharpe@xxxxxxxxxxx>
> Date: Mon, 28 Mar 2016 13:36:18 -0700
> Subject: [PATCH] Make the iscsi lld create a WQ_HIGHPRI workqueue.
> 
> The open-iscsi tools go to heroic efforts to change the nice value of
> the iscsi workqueue to -20. It scans all processes in /proc and
> when it finds the one it is interested in calls setpriority.
> 
> When you are connecting to a reasonable number of iSCSI targets this
> can be costly.
> 
> This small patch has the iscsi LLD do the work itself. It seems like
> the least intrusive way to acheive the result.
> 
> A small patch will be needed in the open-iscsi userspace tools
> as well.
> 
> Signed-off-by: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
> ---
>  drivers/scsi/libiscsi.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 6bffd91..abaefe1 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -2615,9 +2615,11 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
>  	ihost = shost_priv(shost);
>  
>  	if (xmit_can_sleep) {
> +		int wq_flags = __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_HIGHPRI;


I do not think we need to or are supposed to be setting __WQ_LEGACY. It
looks like it was only to catch the case here

https://lkml.org/lkml/2016/1/29/179



>  		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_flags,
> +						ihost->workq_name);
>  		if (!ihost->workq)
>  			goto free_host;
>  	}
> -- 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux