Some cleanups and performance works

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-02-18 18:44:29 +00:00
parent eec2a571dd
commit 6fea5c313e
4 changed files with 17 additions and 9 deletions

View File

@@ -622,7 +622,7 @@ static int recv(struct iscsi_conn *conn)
break;
case RX_CHECK_DDIGEST:
conn->read_state = RX_END;
if (cmnd->pdu.datasize <= 16*1024) {
if (cmnd->pdu.datasize <= 256*1024) {
/* It's cache hot, so let's compute it inline */
TRACE_DBG("cmnd %p, opcode %x: checking RX "
"ddigest inline", cmnd, cmnd_opcode(cmnd));

View File

@@ -684,8 +684,9 @@ debug2perf Makefile target.
- On the target deadline IO scheduler with read_expire and
write_expire increased on all exported devices to 5000 and 15000
correspondingly used to be the fastest, but currently seems CFQ often
outperforms it. So, try on your load and use the best one.
correspondingly should be the fastest for BLOCKIO, but for FILEIO
seems CFQ often outperforms it. So, try on your load and use the best
one.
- It is recommended to turn the kernel preemption off, i.e. set
the kernel preemption model to "No Forced Preemption (Server)".

View File

@@ -1328,11 +1328,11 @@ struct scst_device
unsigned long swp:1;
/*
* Set if device implements own ordered commands management.
* Particularly, if set, expected_sn will be incremented immediately
* after exec() returned.
* Set if device implements own ordered commands management. If not set
* and queue_alg is SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER,
* expected_sn will be incremented only after commands finished.
*/
unsigned long has_own_order_mgmt:1;
unsigned long has_own_order_mgmt:1;
/**************************************************************/

View File

@@ -316,7 +316,8 @@ static int scst_pre_parse(struct scst_cmd *cmd)
TRACE_ENTRY();
cmd->inc_expected_sn_on_done = !dev->has_own_order_mgmt;
cmd->inc_expected_sn_on_done = !dev->has_own_order_mgmt &&
(dev->queue_alg == SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER);
sBUG_ON(cmd->internal);
@@ -2710,8 +2711,14 @@ static void scst_cmd_set_sn(struct scst_cmd *cmd)
scst_check_debug_sn(cmd);
if (cmd->dev->queue_alg == SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER)
if (cmd->dev->queue_alg == SCST_CONTR_MODE_QUEUE_ALG_RESTRICTED_REORDER) {
/*
* Not the best way, but well enough until there will be a
* possibility to specify queue type during pass-through
* commands submission.
*/
cmd->queue_type = SCST_CMD_QUEUE_ORDERED;
}
switch(cmd->queue_type) {
case SCST_CMD_QUEUE_SIMPLE: