Commit 3e2e2a57 authored by paul luse's avatar paul luse Committed by Jim Harris
Browse files

examples/accel_perf: don't schedule final callback when using HW



This results in a significant performance improvement when using
HW offload engines.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: I54d3e39f186c9f878fcf8bed8e9242e29d1e1bf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8162


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 2e8ae729
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
#define DATA_PATTERN 0x5a
#define ALIGN_4K 0x1000

static bool g_using_sw_engine = false;
static uint64_t	g_tsc_rate;
static uint64_t g_tsc_end;
static int g_rc;
@@ -894,8 +895,12 @@ accel_done(void *cb_arg, int status)
	assert(worker);

	task->status = status;
	if (g_using_sw_engine == false) {
		_accel_done(task);
	} else {
		spdk_thread_send_msg(worker->thread, _accel_done, task);
	}
}

static void
accel_perf_start(void *arg1)
@@ -913,6 +918,7 @@ accel_perf_start(void *arg1)
	spdk_put_io_channel(accel_ch);

	if ((g_capabilites & g_workload_selection) != g_workload_selection) {
		g_using_sw_engine = true;
		SPDK_WARNLOG("The selected workload is not natively supported by the current engine\n");
		SPDK_WARNLOG("The software engine will be used instead.\n\n");
	}