]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[SCSI] fcoe: Add sysfs parameter to fcoe for minimum DDP read I/O size
authorYi Zou <yi.zou@intel.com>
Tue, 25 Aug 2009 20:59:03 +0000 (13:59 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:07:27 +0000 (12:07 -0500)
This adds fcoe_ddp_min as a module parameter for fcoe module to:
/sys/module/fcoe/parameters/ddp_min

It is observed that for some hardware, particularly Intel 82599, there is too
much overhead in setting up context for direct data placement (DDP) read when
the requested read I/O size is small. This is added as a module parameter for
performance tuning and is set as 0 by default and user can change this based
on their own hardware.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/fcoe.c

index e32a0ed266aa0431f118404df61bc592ab7f8bf6..a39d370bccf85034b082c999abdea19bb998ecb7 100644 (file)
@@ -49,6 +49,12 @@ MODULE_AUTHOR("Open-FCoE.org");
 MODULE_DESCRIPTION("FCoE");
 MODULE_LICENSE("GPL v2");
 
+/* Performance tuning parameters for fcoe */
+static unsigned int fcoe_ddp_min;
+module_param_named(ddp_min, fcoe_ddp_min, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(ddp_min, "Minimum I/O size in bytes for "     \
+                "Direct Data Placement (DDP).");
+
 /* fcoe host list */
 LIST_HEAD(fcoe_hostlist);
 DEFINE_RWLOCK(fcoe_hostlist_lock);
@@ -414,7 +420,8 @@ static int fcoe_shost_config(struct fc_lport *lp, struct Scsi_Host *shost,
  */
 bool fcoe_oem_match(struct fc_frame *fp)
 {
-       return fc_fcp_is_read(fr_fsp(fp));
+       return fc_fcp_is_read(fr_fsp(fp)) &&
+               (fr_fsp(fp)->data_len > fcoe_ddp_min);
 }
 
 /**