diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c53f681ff..c7954a754e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -131,6 +131,13 @@ library now no longer exists. The contents of the bdev_rpc library have been moved to the bdev library. The app_rpc library now no longer exists. +The bdevperf application now disables the zcopy API by default. Prior to this change, +bdevperf enabled using the zcopy API by default which caused a performance impact of +up to 25% on bdevs that don't natively support zcopy because the API emulates zero-copy +by allocating a buffer. The bdevperf `-x` param was renamed to `-Z` and the default +value changed to false. For bdevs that support zcopy, use the -Z flag to enable +using zcopy API. + ### nvmf Add 'no_wr_batching' parameter to 'spdk_nvmf_transport_opts' struct to disable diff --git a/test/bdev/bdevperf/bdevperf.c b/test/bdev/bdevperf/bdevperf.c index 70f4d73ffb..4d11aea836 100644 --- a/test/bdev/bdevperf/bdevperf.c +++ b/test/bdev/bdevperf/bdevperf.c @@ -80,7 +80,7 @@ static uint64_t g_show_performance_ema_period = 0; static int g_run_rc = 0; static bool g_shutdown = false; static uint64_t g_shutdown_tsc; -static bool g_zcopy = true; +static bool g_zcopy = false; static struct spdk_thread *g_master_thread; static int g_time_in_sec = 0; static bool g_mix_specified = false; @@ -1929,8 +1929,8 @@ bdevperf_parse_arg(int ch, char *arg) g_job_bdev_name = optarg; } else if (ch == 'z') { g_wait_for_tests = true; - } else if (ch == 'x') { - g_zcopy = false; + } else if (ch == 'Z') { + g_zcopy = true; } else if (ch == 'A') { g_abort = true; } else if (ch == 'C') { @@ -1996,7 +1996,7 @@ bdevperf_usage(void) printf(" -S show performance result in real time every seconds\n"); printf(" -T bdev to run against. Default: all available bdevs.\n"); printf(" -f continue processing I/O even after failures\n"); - printf(" -x disable using zcopy bdev API for read or write I/O\n"); + printf(" -Z enable using zcopy bdev API for read or write I/O\n"); printf(" -z start bdevperf, but wait for RPC to start tests\n"); printf(" -A abort the timeout I/O\n"); printf(" -C enable every core to send I/Os to each bdev\n"); @@ -2112,7 +2112,7 @@ main(int argc, char **argv) opts.rpc_addr = NULL; opts.shutdown_cb = spdk_bdevperf_shutdown_cb; - if ((rc = spdk_app_parse_args(argc, argv, &opts, "xzfq:o:t:w:k:ACM:P:S:T:j:", NULL, + if ((rc = spdk_app_parse_args(argc, argv, &opts, "Zzfq:o:t:w:k:ACM:P:S:T:j:", NULL, bdevperf_parse_arg, bdevperf_usage)) != SPDK_APP_PARSE_ARGS_SUCCESS) { return rc;