accel: insert freed tasks at the head of the tailq
We allocate tasks from the head, so it's better to free them to the head too for better cache utilization. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I67c23e3d89cda16f94b1770eada5465015ddb6ff Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10192 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: John Kariuki <John.K.Kariuki@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
d810a7458d
commit
9b3158e8df
@ -122,7 +122,7 @@ spdk_accel_task_complete(struct spdk_accel_task *accel_task, int status)
|
||||
* the accel task list is exhausted when there is recursive call to
|
||||
* allocate accel_task in user's call back function (cb_fn)
|
||||
*/
|
||||
TAILQ_INSERT_TAIL(&accel_ch->task_pool, accel_task, link);
|
||||
TAILQ_INSERT_HEAD(&accel_ch->task_pool, accel_task, link);
|
||||
|
||||
cb_fn(cb_arg, status);
|
||||
/* If this task is part of a batch, check for completion of the batch. */
|
||||
|
Loading…
Reference in New Issue
Block a user