linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Gorenko <sergeygo@mellanox.com>
To: linux-rdma@vger.kernel.org
Cc: sagi@grimberg.me, maxg@mellanox.com,
	Sergey Gorenko <sergeygo@mellanox.com>
Subject: [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command
Date: Thu, 12 Sep 2019 10:35:34 +0000	[thread overview]
Message-ID: <20190912103534.18210-1-sergeygo@mellanox.com> (raw)

Maximum supported IO size is 8MB for the iSER driver. The
current value is limited by the ISCSI_ISER_MAX_SG_TABLESIZE
macro. But the driver is able to handle 16MB IOs without any
significant changes. Increasing this limit can be useful for
the storage arrays which are fine tuned for IOs larger than
8 MB.

This commit allows to configure maximum IO size up to 16MB
using the max_sectors module parameter.

Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
---
Changes from v0:
- Change 512 to SECTOR_SIZE (suggested by Sagi)

 drivers/infiniband/ulp/iser/iscsi_iser.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 39bf213444cb..52ce63592dcf 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -102,9 +102,10 @@
 
 /* Default support is 512KB I/O size */
 #define ISER_DEF_MAX_SECTORS		1024
-#define ISCSI_ISER_DEF_SG_TABLESIZE	((ISER_DEF_MAX_SECTORS * 512) >> SHIFT_4K)
-/* Maximum support is 8MB I/O size */
-#define ISCSI_ISER_MAX_SG_TABLESIZE	((16384 * 512) >> SHIFT_4K)
+#define ISCSI_ISER_DEF_SG_TABLESIZE                                            \
+	((ISER_DEF_MAX_SECTORS * SECTOR_SIZE) >> SHIFT_4K)
+/* Maximum support is 16MB I/O size */
+#define ISCSI_ISER_MAX_SG_TABLESIZE	((32768 * SECTOR_SIZE) >> SHIFT_4K)
 
 #define ISER_DEF_XMIT_CMDS_DEFAULT		512
 #if ISCSI_DEF_XMIT_CMDS_MAX > ISER_DEF_XMIT_CMDS_DEFAULT
-- 
2.17.2


             reply	other threads:[~2019-09-12 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 10:35 Sergey Gorenko [this message]
2019-09-12 15:19 ` [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command Jason Gunthorpe
2019-09-12 21:14   ` Max Gurtovoy
2019-09-12 21:45     ` Sagi Grimberg

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=20190912103534.18210-1-sergeygo@mellanox.com \
    --to=sergeygo@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    /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;
as well as URLs for NNTP newsgroup(s).