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: paul 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: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
2e8ae7294a
commit
3e2e2a5765
@ -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,7 +895,11 @@ accel_done(void *cb_arg, int status)
|
||||
assert(worker);
|
||||
|
||||
task->status = status;
|
||||
spdk_thread_send_msg(worker->thread, _accel_done, task);
|
||||
if (g_using_sw_engine == false) {
|
||||
_accel_done(task);
|
||||
} else {
|
||||
spdk_thread_send_msg(worker->thread, _accel_done, task);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user