Commit 6799d46a authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

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: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: Ibfb914f10590f2370be58cabe06df466bbb3dc90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12902


Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent b21221e1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
		}