|
From: <vl...@us...> - 2010-01-11 19:27:18
|
Revision: 1448
http://scst.svn.sourceforge.net/scst/?rev=1448&view=rev
Author: vlnb
Date: 2010-01-11 19:27:07 +0000 (Mon, 11 Jan 2010)
Log Message:
-----------
Let's experimantally disable SCST_MAX_DEV_COMMANDS and cmd->dev_cmd_count functionality and see if users will complain about it. If not, we will remove it.
Modified Paths:
--------------
trunk/scst/src/scst_targ.c
Modified: trunk/scst/src/scst_targ.c
===================================================================
--- trunk/scst/src/scst_targ.c 2010-01-11 19:16:38 UTC (rev 1447)
+++ trunk/scst/src/scst_targ.c 2010-01-11 19:27:07 UTC (rev 1448)
@@ -33,11 +33,16 @@
#include "scst.h"
#include "scst_priv.h"
-#if 0 /* Temporary, left for future performance investigations */
+#if 0 /* Temporary left for future performance investigations */
/* Deleting it don't forget to delete write_cmd_count */
#define CONFIG_SCST_ORDERED_READS
#endif
+#if 0 /* Let's disable it for now to see if users will complain about it */
+/* Deleting it don't forget to delete write_cmd_count */
+#define CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
+#endif
+
static void scst_cmd_set_sn(struct scst_cmd *cmd);
static int __scst_init_cmd(struct scst_cmd *cmd);
static void scst_finish_cmd_mgmt(struct scst_cmd *cmd);
@@ -2869,7 +2874,9 @@
* latency, so we should decrement them after cmd completed.
*/
atomic_dec(&cmd->tgt_dev->tgt_dev_cmd_count);
+#ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
atomic_dec(&cmd->dev->dev_cmd_count);
+#endif
#ifdef CONFIG_SCST_ORDERED_READS
/* If expected values not set, expected direction is UNKNOWN */
if (cmd->expected_data_direction & SCST_DATA_WRITE)
@@ -3322,6 +3329,7 @@
failure = true;
}
+#ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT
cnt = atomic_inc_return(&cmd->dev->dev_cmd_count);
if (unlikely(cnt > SCST_MAX_DEV_COMMANDS)) {
if (!failure) {
@@ -3335,6 +3343,7 @@
failure = true;
}
}
+#endif
#ifdef CONFIG_SCST_ORDERED_READS
/* If expected values not set, expected direction is UNKNOWN */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|