Skip to contentSkip to conversation

Patch "IB/iser: Fix sg_tablesize calculation" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 30, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/iser: Fix sg_tablesize calculation

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-iser-fix-sg_tablesize-calculation.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 1e5db6c31ade4150c2e2b1a21e39f776c38fea39 Mon Sep 17 00:00:00 2001

From: Max Gurtovoy <[email protected]>
Date: Wed, 18 Jan 2017 00:40:39 +0200
Subject: IB/iser: Fix sg_tablesize calculation

From: Max Gurtovoy <[email protected]>

commit 1e5db6c31ade4150c2e2b1a21e39f776c38fea39 upstream.

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.

---
 drivers/infiniband/ulp/iser/iscsi_iser.c |    7 -------
 1 file changed, 7 deletions(-)
drivers/infiniband/ulp/iser/iscsi_iser.c +0 -7
@@ -651,13 +651,6 @@ iscsi_iser_session_create(struct iscsi_e
 						   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);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ib-srp-fix-mr-allocation-when-the-device-supports-sg-gaps.patch queue-4.9/ib-srp-fix-invalid-indirect_sg_entries-parameter-value.patch queue-4.9/ib-iser-fix-sg_tablesize-calculation.patch