From dc562ff8b5eaa54655caf2a4969930de2bd2bc48 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 2 Apr 2009 18:42:34 +0000 Subject: [PATCH] Merge of trunk r733-737 git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/1.0.1.x@738 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 1 + iscsi-scst/usr/Makefile | 2 +- scst/README | 16 +++++++--------- scst/README_in-tree | 16 +++++++--------- scst/include/scst_sgv.h | 3 +++ scst/src/dev_handlers/scst_user.c | 6 +++--- scst/src/scst_targ.c | 6 ++++-- scstadmin/scst_db/scst_db | 2 +- scstadmin/scstadmin | 2 +- 9 files changed, 28 insertions(+), 26 deletions(-) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index b7f88171c..57f50a25c 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/iscsi-scst/usr/Makefile b/iscsi-scst/usr/Makefile index 0ce5f815e..7356ffab8 100644 --- a/iscsi-scst/usr/Makefile +++ b/iscsi-scst/usr/Makefile @@ -22,7 +22,7 @@ SRCS_ADM = iscsi_adm.c param.c OBJS_ADM = $(SRCS_ADM:.c=.o) CFLAGS += -O2 -fno-inline -Wall -Wextra -Wstrict-prototypes -Wno-sign-compare \ - -Werror=implicit-function-declaration -Wno-unused-parameter \ + -Wimplicit-function-declaration -Wno-unused-parameter \ -Wno-missing-field-initializers -g -I../include CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8 diff --git a/scst/README b/scst/README index dbff71ad0..5cc166d4a 100644 --- a/scst/README +++ b/scst/README @@ -770,19 +770,14 @@ II. In order to get the maximum performance you should: - Disable in Makefile CONFIG_SCST_TRACING and CONFIG_SCST_DEBUG. - - If your initiator(s) use dedicated exported from the target virtual - SCSI devices and have more or equal amount of memory, than the - target, it is recommended to use O_DIRECT option (currently it is - available only with fileio_tgt user space program) or BLOCKIO. With - them you could have up to 100% increase in throughput. -IMPORTANT: Some of the compilation options enabled by default, i.e. SCST -========= is optimized currently rather for development and bug hunting, - than for performance. +IMPORTANT: Some of the above compilation options in the SCST SVN enabled by default, +========= i.e. development version of SCST is optimized currently rather for + development and bug hunting, than for performance. If you use SCST version taken directly from the SVN repository, you can set the above options, except CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ, -using debug2perf Makefile target. +in the needed values using debug2perf root Makefile target. 4. For other target and initiator software parts: @@ -857,6 +852,9 @@ using debug2perf Makefile target. provide you the best performance. But using it make sure you use a good UPS with ability to shutdown the target on the power failure. +Baseline performance numbers you can find in those measurements: +http://lkml.org/lkml/2009/3/30/283. + IMPORTANT: If you use on initiator some versions of Windows (at least W2K) ========= you can't get good write performance for VDISK FILEIO devices with default 512 bytes block sizes. You could get about 10% of the diff --git a/scst/README_in-tree b/scst/README_in-tree index 22048234c..2ef50c9b0 100644 --- a/scst/README_in-tree +++ b/scst/README_in-tree @@ -705,19 +705,14 @@ II. In order to get the maximum performance you should: - Disable in Makefile CONFIG_SCST_TRACING and CONFIG_SCST_DEBUG. - - If your initiator(s) use dedicated exported from the target virtual - SCSI devices and have more or equal amount of memory, than the - target, it is recommended to use O_DIRECT option (currently it is - available only with fileio_tgt user space program) or BLOCKIO. With - them you could have up to 100% increase in throughput. -IMPORTANT: Some of the compilation options enabled by default, i.e. SCST -========= is optimized currently rather for development and bug hunting, - than for performance. +IMPORTANT: Some of the above compilation options in the SCST SVN enabled by default, +========= i.e. development version of SCST is optimized currently rather for + development and bug hunting, than for performance. If you use SCST version taken directly from the SVN repository, you can set the above options, except CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ, -using debug2perf Makefile target. +in the needed values using debug2perf root Makefile target. 4. For other target and initiator software parts: @@ -792,6 +787,9 @@ using debug2perf Makefile target. provide you the best performance. But using it make sure you use a good UPS with ability to shutdown the target on the power failure. +Baseline performance numbers you can find in those measurements: +http://lkml.org/lkml/2009/3/30/283. + IMPORTANT: If you use on initiator some versions of Windows (at least W2K) ========= you can't get good write performance for VDISK FILEIO devices with default 512 bytes block sizes. You could get about 10% of the diff --git a/scst/include/scst_sgv.h b/scst/include/scst_sgv.h index 01bcd75c7..c09d0c9c7 100644 --- a/scst/include/scst_sgv.h +++ b/scst/include/scst_sgv.h @@ -17,6 +17,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#ifndef __SCST_SGV_H +#define __SCST_SGV_H /* SGV pool routines and flag bits */ @@ -67,3 +69,4 @@ void sgv_pool_free(struct sgv_pool_obj *sgv, struct scst_mem_lim *mem_lim); void *sgv_get_priv(struct sgv_pool_obj *sgv); void scst_init_mem_lim(struct scst_mem_lim *mem_lim); +#endif /* ifndef __SCST_SGV_H */ diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 724e7d836..a67f42134 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -1529,7 +1529,7 @@ static int dev_user_reply_cmd(struct file *file, void __user *arg) if (unlikely(res < 0)) goto out_up; - TRACE_MGMT_DBG("Reply for dev %s", dev->name); + TRACE_DBG("Reply for dev %s", dev->name); TRACE_BUFFER("Reply", &reply, sizeof(reply)); @@ -2317,9 +2317,9 @@ static int dev_user_task_mgmt_fn(struct scst_mgmt_cmd *mcmd, } TRACE_MGMT_DBG("Preparing TM ucmd %p (h %d, fn %d, cmd_to_abort %p, " - "ucmd_to_abort %p, cmd_h_to_abort %d)", ucmd, ucmd->h, + "ucmd_to_abort %p, cmd_h_to_abort %d, mcmd %p)", ucmd, ucmd->h, mcmd->fn, mcmd->cmd_to_abort, ucmd_to_abort, - ucmd->user_cmd.tm_cmd.cmd_h_to_abort); + ucmd->user_cmd.tm_cmd.cmd_h_to_abort, mcmd); ucmd->mcmd = mcmd; ucmd->state = UCMD_STATE_TM_EXECING; diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 7efd98775..b03efc044 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -3794,10 +3794,12 @@ void scst_prepare_async_mcmd(struct scst_mgmt_cmd *mcmd) TRACE_ENTRY(); - TRACE_MGMT_DBG("Preparing mcmd %p for async execution", mcmd); + TRACE_MGMT_DBG("Preparing mcmd %p for async execution " + "(cmd_finish_wait_count %d)", mcmd, + mcmd->cmd_finish_wait_count); spin_lock_irqsave(&scst_mcmd_lock, flags); - mcmd->cmd_finish_wait_count++; + mcmd->cmd_finish_wait_count++; spin_unlock_irqrestore(&scst_mcmd_lock, flags); TRACE_EXIT(); diff --git a/scstadmin/scst_db/scst_db b/scstadmin/scst_db/scst_db index 7f50a3d75..5f2c0749d 100755 --- a/scstadmin/scst_db/scst_db +++ b/scstadmin/scst_db/scst_db @@ -16,7 +16,7 @@ General Operations -check : Check database configuration against current configuration. Options - -ForceConfig : Force all confuration changes, even deletions (DANGER!). + -ForceConfig : Force all configuration changes, even deletions (DANGER!). Debugging (limited support) -debug : Debug mode - don\'t do anything destructive. diff --git a/scstadmin/scstadmin b/scstadmin/scstadmin index 9f7f21dff..391cff530 100755 --- a/scstadmin/scstadmin +++ b/scstadmin/scstadmin @@ -55,7 +55,7 @@ Assignments Operations -group Options - -ForceConfig : Force all confuration changes, even deletions (DANGER!). + -ForceConfig : Force all configuration changes, even deletions (DANGER!). Debugging (limited support) -debug : Debug mode - don\'t do anything destructive.