Commit 451462f6 authored by Jim Harris's avatar Jim Harris
Browse files

accel_perf: cycle tasks through task_pool



When a task completes, always put it back in the task
pool (using TAILQ_INSERT_TAIL) and then use _get_task
to get a task for the next submission.  Currently this
will just allocate the task that was just put into
the TAILQ.  But an upcoming patch will allocate
more tasks than we have queue depth, and this patch
will ensure all of those tasks get used evenly.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Ia6247a76ba60337fe6da3189e6c305f4dfb0a041
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8450


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 4cd7ca9b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -618,6 +618,8 @@ _accel_done(void *arg1)
	worker->current_queue_depth--;

	if (!worker->is_draining) {
		TAILQ_INSERT_TAIL(&worker->tasks_pool, task, link);
		task = _get_task(worker);
		if (g_ops_per_batch == 0) {
			_submit_single(worker, task);
			worker->current_queue_depth++;