From 6fea5c313ef3efdf979bc96b79b8b502998ba00e Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 18 Feb 2008 18:44:29 +0000 Subject: [PATCH] Some cleanups and performance works git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@288 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/nthread.c | 2 +- scst/README | 5 +++-- scst/include/scsi_tgt.h | 8 ++++---- scst/src/scst_targ.c | 11 +++++++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 75e14025e..b05c34f85 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -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)); diff --git a/scst/README b/scst/README index 95298a06e..533afcd43 100644 --- a/scst/README +++ b/scst/README @@ -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)". diff --git a/scst/include/scsi_tgt.h b/scst/include/scsi_tgt.h index eba7f8431..3905e5842 100644 --- a/scst/include/scsi_tgt.h +++ b/scst/include/scsi_tgt.h @@ -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; /**************************************************************/ diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 3be990505..1c5a9f5d0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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: