All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 1/2] IB/iser: Fix sg_tablesize calculation
@ 2017-01-17 22:40 Max Gurtovoy
       [not found] ` <1484692840-12400-1-git-send-email-maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Max Gurtovoy @ 2017-01-17 22:40 UTC (permalink / raw)
  To: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	sagi-NQWnxTmZq1alnMjI0IkVqw, hch-jcswGhMUV9g,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Max Gurtovoy

For devices that can register page list that is bigger than
USHRT_MAX, we actually take the wrong value for sg_tablesize.
E.g: for CX4 max_fast_reg_page_list_len is 65536 (bigger than USHRT_MAX)
so we set sg_tablesize to 0 by mistake. Therefore, each IO that is
bigger than 4k splitted to "< 4k" chunks that cause performance degredation.
Remove wrong sg_tablesize assignment, and use the value that was set during
address resolution handler with the needed casting.

Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.5+
Signed-off-by: Max Gurtovoy <maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
---
Changes since v2:
 - remove "Fixes" statement

Changes since v1:
 - update "Fixes" statement
 - use sg_tablesize assignment from iser_calc_scsi_params()
 - add patch 2/2 to remove unneeded variable
---
 drivers/infiniband/ulp/iser/iscsi_iser.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 9104e6b..1c91187 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -651,13 +651,6 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task)
 						   SHOST_DIX_GUARD_CRC);
 		}
 
-		/*
-		 * Limit the sg_tablesize and max_sectors based on the device
-		 * max fastreg page list length.
-		 */
-		shost->sg_tablesize = min_t(unsigned short, shost->sg_tablesize,
-			ib_conn->device->ib_device->attrs.max_fast_reg_page_list_len);
-
 		if (iscsi_host_add(shost,
 				   ib_conn->device->ib_device->dma_device)) {
 			mutex_unlock(&iser_conn->state_mutex);
-- 
1.7.1

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

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

end of thread, other threads:[~2017-01-24 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 22:40 [PATCHv3 1/2] IB/iser: Fix sg_tablesize calculation Max Gurtovoy
     [not found] ` <1484692840-12400-1-git-send-email-maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-17 22:40   ` [PATCHv3 2/2] IB/iser: remove unused variable from iser_conn struct Max Gurtovoy
     [not found]     ` <1484692840-12400-2-git-send-email-maxg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-18  6:51       ` Sagi Grimberg
     [not found]         ` <91c76eee-bead-16e2-1642-a8e4cf89ee73-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-01-18 17:13           ` Steve Wise
2017-01-19 16:38             ` Raju  Rangoju
     [not found]               ` <CY1PR12MB07749D43502D9F051DA5AFA1BC7E0-1s8aH8ViOEdztePUUsNjzQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-24 16:38                 ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.