idxd: free ops to the head of the tailq

We allocate from the head, so it's better to free to
the head too for better cache utilization.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5c32244f446bd7a1df12eefc81245b3ef7e24070
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10193
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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:
Jim Harris 2021-11-11 13:17:56 -07:00 committed by Tomasz Zawadzki
parent 9b3158e8df
commit 76c73407cb

View File

@ -1149,7 +1149,7 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan)
if (op->desc->opcode == IDXD_OPCODE_BATCH) {
_free_batch(op->batch, chan);
} else if (op->batch == NULL) {
TAILQ_INSERT_TAIL(&chan->ops_pool, op, link);
TAILQ_INSERT_HEAD(&chan->ops_pool, op, link);
}
if (cb_fn) {