linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command
@ 2019-09-12 10:35 Sergey Gorenko
  2019-09-12 15:19 ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Gorenko @ 2019-09-12 10:35 UTC (permalink / raw)
  To: linux-rdma; +Cc: sagi, maxg, Sergey Gorenko

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


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

* Re: [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command
  2019-09-12 10:35 [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command Sergey Gorenko
@ 2019-09-12 15:19 ` Jason Gunthorpe
  2019-09-12 21:14   ` Max Gurtovoy
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2019-09-12 15:19 UTC (permalink / raw)
  To: Sergey Gorenko; +Cc: linux-rdma, sagi, Max Gurtovoy

On Thu, Sep 12, 2019 at 10:35:34AM +0000, Sergey Gorenko wrote:
> 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(-)

Applied to for-next with Sagi's ack

Thanks,
Jason

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

* Re: [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command
  2019-09-12 15:19 ` Jason Gunthorpe
@ 2019-09-12 21:14   ` Max Gurtovoy
  2019-09-12 21:45     ` Sagi Grimberg
  0 siblings, 1 reply; 4+ messages in thread
From: Max Gurtovoy @ 2019-09-12 21:14 UTC (permalink / raw)
  To: Jason Gunthorpe, Sergey Gorenko; +Cc: linux-rdma, sagi


On 9/12/2019 6:19 PM, Jason Gunthorpe wrote:
> On Thu, Sep 12, 2019 at 10:35:34AM +0000, Sergey Gorenko wrote:
>> 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)

is this always true ? 512 == SECTOR_SIZE ?


>>
>>   drivers/infiniband/ulp/iser/iscsi_iser.h | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
> Applied to for-next with Sagi's ack
>
> Thanks,
> Jason

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

* Re: [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command
  2019-09-12 21:14   ` Max Gurtovoy
@ 2019-09-12 21:45     ` Sagi Grimberg
  0 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2019-09-12 21:45 UTC (permalink / raw)
  To: Max Gurtovoy, Jason Gunthorpe, Sergey Gorenko; +Cc: linux-rdma


>>> 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)
> 
> is this always true ? 512 == SECTOR_SIZE ?

 From the documentation it is, and nothing suggest otherwise.
/*
  * The basic unit of block I/O is a sector. It is used in a number of 
contexts
  * in Linux (blk, bio, genhd). The size of one sector is 512 = 2**9
  * bytes. Variables of type sector_t represent an offset or size that is a
  * multiple of 512 bytes. Hence these two constants.
  */
#ifndef SECTOR_SHIFT
#define SECTOR_SHIFT 9
#endif
#ifndef SECTOR_SIZE
#define SECTOR_SIZE (1 << SECTOR_SHIFT)
#endif

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

end of thread, other threads:[~2019-09-12 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 10:35 [PATCH v1] IB/iser: Support up to 16MB data transfer in a single command Sergey Gorenko
2019-09-12 15:19 ` Jason Gunthorpe
2019-09-12 21:14   ` Max Gurtovoy
2019-09-12 21:45     ` Sagi Grimberg

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