diff --git a/test/bdev/bdevperf/bdevperf.c b/test/bdev/bdevperf/bdevperf.c index a1b250c91..f090cdcd8 100644 --- a/test/bdev/bdevperf/bdevperf.c +++ b/test/bdev/bdevperf/bdevperf.c @@ -53,6 +53,7 @@ struct bdevperf_task { struct spdk_bdev_io_wait_entry bdev_io_wait; }; +static const char *g_workload_type; static int g_io_size = 0; /* initialize to invalid value so we can detect if user overrides it. */ static int g_rw_percentage = -1; @@ -71,15 +72,14 @@ static bool g_run_failed = false; static bool g_shutdown = false; static uint64_t g_shutdown_tsc; static bool g_zcopy = true; -static int g_mem_size = 0; static unsigned g_master_core; +static int g_time_in_sec; +static bool g_mix_specified; static struct spdk_poller *g_perf_timer = NULL; static void bdevperf_submit_single(struct io_target *target, struct bdevperf_task *task); -#include "../common.c" - struct io_target { char *name; struct spdk_bdev *bdev; @@ -582,25 +582,19 @@ bdevperf_submit_on_core(void *arg1, void *arg2) } } -static void usage(char *program_name) +static void +bdevperf_usage(void) { - printf("%s options\n", program_name); - printf("\t[-c configuration file]\n"); - printf("\t[-d memory size in MB]\n"); - printf("\t[-m core mask for distributing I/O submission/completion work\n"); - printf("\t\t(default: 0x1 - use core 0 only)]\n"); - printf("\t[-q io depth]\n"); - printf("\t[-s io size in bytes]\n"); - printf("\t[-w io pattern type, must be one of\n"); - printf("\t\t(read, write, randread, randwrite, rw, randrw, verify, reset, unmap, flush)]\n"); - printf("\t[-M rwmixread (100 for reads, 0 for writes)]\n"); - printf("\t[-t time in seconds]\n"); - printf("\t[-P Number of moving average period]\n"); + printf(" -q io depth\n"); + printf(" -o io size in bytes\n"); + printf(" -w io pattern type, must be one of (read, write, randread, randwrite, rw, randrw, verify, reset, unmap, flush)\n"); + printf(" -t