Skip to contentSkip to conversation

mpt fusion: [2.6.30-rc6] Module parameters to change queue depth for FC,SPI,SAS

PATCH In review Kashyap, Desai 2 participants 2 messages May 22, 2009 – May 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 23/24 mpt fusion: [2.6.30-rc6] Module parameters to change queue depth for FC,SPI,SAS

1. Unused mptscsih_timer_expired() function is removed.
2. Module parameter mpt_sdev_queue_depth to support different queue depth for different Buses (FC/SPI/SAS).
3. changed driver versiont to 3.04.11.
---

---

drivers/message/fusion/mptbase.h +5 -3
index 1c8514d..44ef2a0 100644
@@ -76,8 +76,8 @@
 #define COPYRIGHT	"Copyright (c) 1999-2008 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON	"3.04.10"
-#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.04.09"
+#define MPT_LINUX_VERSION_COMMON	"3.04.11"
+#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.04.11"
 #define WHAT_MAGIC_STRING		"@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
@@ -157,8 +157,9 @@
 /*
  *	Try to keep these at 2^N-1
  */
-#define MPT_FC_CAN_QUEUE	127
+#define MPT_FC_CAN_QUEUE	1024
 #define MPT_SCSI_CAN_QUEUE	127
+#define MPT_SAS_CAN_QUEUE	127
 
 /*
  * Set the MAX_SGE value based on user input.
@@ -757,6 +758,7 @@ typedef struct _MPT_ADAPTER
 
 	struct scsi_cmnd	**ScsiLookup;
 	spinlock_t		  scsi_lookup_lock;
+	int			  sdev_queue_depth;	/* sdev queue depth */
 	u64			dma_mask;
 	u32			  broadcast_aen_busy;
 	char			 reset_work_q_name[MPT_KOBJ_NAME_LEN];
drivers/message/fusion/mptfc.c +38 -19

81 lines not on this page · raw message

drivers/message/fusion/mptsas.c +40 -21

93 lines not on this page · raw message

drivers/message/fusion/mptscsih.c +16 -52

101 lines not on this page · raw message

drivers/message/fusion/mptscsih.h +0 -1
index 77f021e..17d6ea6 100644
@@ -128,7 +128,6 @@ extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRA
 extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
 extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
 extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
-extern void mptscsih_timer_expired(unsigned long data);
 extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout);
 extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
 extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
drivers/message/fusion/mptspi.c +1 -19
index c9fa919..d6f658d 100644
@@ -1472,26 +1472,8 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
 		 ioc->name, ioc->ScsiLookup));
 
-	/* Clear the TM flags
-	 */
-	hd->abortSCpnt = NULL;
-
-	/* Clear the pointer used to store
-	 * single-threaded commands, i.e., those
-	 * issued during a bus scan, dv and
-	 * configuration pages.
-	 */
-	hd->cmdPtr = NULL;
-
-	/* Initialize this SCSI Hosts' timers
-	 * To use, set the timer expires field
-	 * and add_timer
-	 */
-	init_timer(&hd->timer);
-	hd->timer.data = (unsigned long) hd;
-	hd->timer.function = mptscsih_timer_expired;
-
 	ioc->spi_data.Saf_Te = mpt_saf_te;
+	ioc->sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
 
 	hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
 	ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
maintainer
#1 lore raw
Quoted 2 lines · Desai

1. Unused mptscsih_timer_expired() function is removed.
2. Module parameter mpt_sdev_queue_depth to support different queue depth for different Buses (FC/SPI/SAS).

There's no need for a module parameter since there's already a device parameter to set.

Quoted 59 lines

3. changed driver versiont to 3.04.11.
---

---

drivers/message/fusion/mptbase.h +5 -3
index 1c8514d..44ef2a0 100644
@@ -76,8 +76,8 @@
 #define COPYRIGHT	"Copyright (c) 1999-2008 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON	"3.04.10"
-#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.04.09"
+#define MPT_LINUX_VERSION_COMMON	"3.04.11"
+#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.04.11"
 #define WHAT_MAGIC_STRING		"@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
@@ -157,8 +157,9 @@
 /*
  *	Try to keep these at 2^N-1
  */
-#define MPT_FC_CAN_QUEUE	127
+#define MPT_FC_CAN_QUEUE	1024
 #define MPT_SCSI_CAN_QUEUE	127
+#define MPT_SAS_CAN_QUEUE	127
 
 /*
  * Set the MAX_SGE value based on user input.
@@ -757,6 +758,7 @@ typedef struct _MPT_ADAPTER
 
 	struct scsi_cmnd	**ScsiLookup;
 	spinlock_t		  scsi_lookup_lock;
+	int			  sdev_queue_depth;	/* sdev queue depth */
 	u64			dma_mask;
 	u32			  broadcast_aen_busy;
 	char			 reset_work_q_name[MPT_KOBJ_NAME_LEN];
drivers/message/fusion/mptfc.c +8 -0
index e61df13..1a3975c 100644
@@ -84,6 +84,14 @@ MODULE_PARM_DESC(mptfc_dev_loss_tmo, " Initial time the driver programs the "
 				     " return following a device loss event."
 				     "  Default=60.");
 
+static int mpt_sdev_queue_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
+static int mptfc_set_sdev_queue_depth(const char *val, struct kernel_param *kp);
+module_param_call(mpt_sdev_queue_depth, mptfc_set_sdev_queue_depth,
+    param_get_int,  &mpt_sdev_queue_depth, 0600);
+MODULE_PARM_DESC(mpt_sdev_queue_depth,
+    " Max Device Queue Depth (default="
+    __MODULE_STRING(MPT_SCSI_CMD_PER_DEV_HIGH) ")");
+
 /* scsi-mid layer global parmeter is max_report_luns, which is 511 */
 #define MPTFC_MAX_LUN (16895)
 static int max_lun = MPTFC_MAX_LUN;

drivers/message/fusion/mptfc.c static struct fc_function_template mptfc_transport_functions = { · line 198

Quoted 8 lines
drivers/message/fusion/mptfc.c +5 -0
@@ -183,6 +191,34 @@ static struct fc_function_template mptfc_transport_functions = {
 	.show_host_symbolic_name = 1,
 };
 
+/**
+ *	mptfc_set_sdev_queue_depth - global setting of the mpt_sdev_queue_depth
+ *	found via /sys/module/mptfc/parameters/mpt_sdev_queue_depth
+ *	@val:
+ *	@kp:

This is the wrong thing to do. You'd give the driver two separate queue depth knobs (under the device and under the module). Please just use the one under the device for feeding in set parameters otherwise it will
only end up confusing users. The fixed limits are supposed to reflect
hardware, not some random number a user can feed in via the module parameters ... otherwise there's not much point having fixed limits.

James