From 02c669d135cf682ed928e8953e7aa95c5a2623f0 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Fri, 21 Jan 2022 10:02:53 -0700 Subject: [PATCH] examples/idxd: Deal with queued tasks during drain If a task is on the resubmit list, make sure to clear it out during the drain phase or the queue depth will never go to 0. Signed-off-by: Ben Walker Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11208 (master) (cherry picked from commit 0267f8a977ca6149f880c2e525881517127ce5c0) Change-Id: I859a03d76865d404ce43e38cfb34c27ca436e537 Signed-off-by: Krzysztof Karas Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11280 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- examples/idxd/perf/perf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/idxd/perf/perf.c b/examples/idxd/perf/perf.c index 3bbc33f44..73292e505 100644 --- a/examples/idxd/perf/perf.c +++ b/examples/idxd/perf/perf.c @@ -502,11 +502,13 @@ _get_task(struct idxd_chan_entry *t) return task; } +static int idxd_chan_poll(struct idxd_chan_entry *chan); + static void drain_io(struct idxd_chan_entry *t) { while (t->current_queue_depth > 0) { - spdk_idxd_process_events(t->ch); + idxd_chan_poll(t); } }