[ofa-general] [PATCH 3/3] IB/srp: use scatter gather chaining

David Dillow dillowda at ornl.gov
Wed Dec 19 14:09:15 PST 2007


By default, the SCSI mid-layer seems to send down 512KB requests
(sg_tablesize = 256), with some requests occasionally combined. By
allowing the mid-layer to chain requests, we can easily grow to 1024KB
or larger -- I've tested 4096KB I/O requests with no problems.

Signed-off-by: David Dillow <dillowda at ornl.gov>
---
I looked through the DMA paths on the hardware drivers to ensure they
could take advantage of the SG chaining, and it seems that every one
except iPath uses the system's DMA routines, which have been converted
to handle chaining. iPath looks like it should be OK, but I have no way
to test it.

This patch was essential in allowing me to max out bandwidth to my disk
arrays.

 ib_srp.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 9cb77e6..4f58f94 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1545,6 +1545,7 @@ static struct scsi_host_template srp_template = {
 	.this_id			= -1,
 	.cmd_per_lun			= SRP_SQ_SIZE,
 	.use_clustering			= ENABLE_CLUSTERING,
+	.use_sg_chaining		= ENABLE_SG_CHAINING,
 	.shost_attrs			= srp_host_attrs
 };
 





More information about the general mailing list