examples/accel_perf: only increment outstanding IO in one place

Simplify things a bit for an upcoming patch. This also fixes an
annoyance when there's a submission error, previously the
outstanding IO assert would have hit in the completion routine
because of the previous location of the increment..

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibfb914f10590f2370be58cabe06df466bbb3dc90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12902
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
paul luse 2022-06-03 14:02:12 -07:00 committed by Tomasz Zawadzki
parent b21221e174
commit 6799d46a44

View File

@ -406,6 +406,7 @@ _submit_single(struct worker_thread *worker, struct ap_task *task)
}
worker->current_queue_depth++;
if (rc) {
accel_done(task, rc);
}
@ -566,7 +567,6 @@ accel_done(void *arg1, int status)
TAILQ_INSERT_TAIL(&worker->tasks_pool, task, link);
task = _get_task(worker);
_submit_single(worker, task);
worker->current_queue_depth++;
} else {
TAILQ_INSERT_TAIL(&worker->tasks_pool, task, link);
}
@ -733,7 +733,6 @@ _init_thread(void *arg1)
/* Load up queue depth worth of operations. */
for (i = 0; i < g_queue_depth; i++) {
task = _get_task(worker);
worker->current_queue_depth++;
if (task == NULL) {
goto error;
}