From 155cde35ae20f3727755092b11a9a605b75b7c7a Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 28 Aug 2012 19:26:43 +0000 Subject: [PATCH] Increase MAX_NR_QUEUED_CMNDS to better handle multu-LUs per target cases git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4496 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/include/iscsi_scst.h | 2 +- iscsi-scst/kernel/config.c | 10 ++++++++++ iscsi-scst/kernel/param.c | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/include/iscsi_scst.h b/iscsi-scst/include/iscsi_scst.h index 592c98316..936bc7c50 100644 --- a/iscsi-scst/include/iscsi_scst.h +++ b/iscsi-scst/include/iscsi_scst.h @@ -185,7 +185,7 @@ struct iscsi_kern_initiator_info { #define DEFAULT_NR_QUEUED_CMNDS 32 #define MIN_NR_QUEUED_CMNDS 1 -#define MAX_NR_QUEUED_CMNDS 256 +#define MAX_NR_QUEUED_CMNDS 2048 #define DEFAULT_RSP_TIMEOUT 90 #define MIN_RSP_TIMEOUT 2 diff --git a/iscsi-scst/kernel/config.c b/iscsi-scst/kernel/config.c index 8ba746019..74eb411d0 100644 --- a/iscsi-scst/kernel/config.c +++ b/iscsi-scst/kernel/config.c @@ -1057,7 +1057,17 @@ static int iscsi_register(void __user *arg) memset(®, 0, sizeof(reg)); reg.max_data_seg_len = ISCSI_CONN_IOV_MAX << PAGE_SHIFT; + + /* + * In iSCSI all LUs in a session share queue depth, so let's not + * limit it too much for thousands of LUs VMware and other similar + * systems cases. + */ +#if 0 reg.max_queued_cmds = scst_get_max_lun_commands(NULL, NO_SUCH_LUN); +#else + reg.max_queued_cmds = MAX_NR_QUEUED_CMNDS; +#endif res = 0; diff --git a/iscsi-scst/kernel/param.c b/iscsi-scst/kernel/param.c index 7d7a8db62..ea0318bb8 100644 --- a/iscsi-scst/kernel/param.c +++ b/iscsi-scst/kernel/param.c @@ -209,8 +209,7 @@ static void tgt_params_check(struct iscsi_session *session, */ CHECK_PARAM(info, iparams, queued_cmnds, MIN_NR_QUEUED_CMNDS, - min_t(int, MAX_NR_QUEUED_CMNDS, - scst_get_max_lun_commands(session->scst_sess, NO_SUCH_LUN))); + MAX_NR_QUEUED_CMNDS); CHECK_PARAM(info, iparams, rsp_timeout, MIN_RSP_TIMEOUT, MAX_RSP_TIMEOUT); CHECK_PARAM(info, iparams, nop_in_interval, MIN_NOP_IN_INTERVAL,