From 4c4619323dcd2d8d8c5d043f944523e1b2976c8a Mon Sep 17 00:00:00 2001 From: GangCao Date: Wed, 13 Dec 2017 00:41:38 -0500 Subject: [PATCH] Perf: only count into inflight IO when successfully sending There is a case in high queue depth situation and the IO may be failed due to no memory. Our perf tool did not recognize this and always count the IO in the inflight IOs. Thus in the completion, it waits more than actual IOs to return and the Perf is hanging. Change-Id: Ie5472e260c75c5abd80c06eb6c613dc7d1761c78 Signed-off-by: GangCao Reviewed-on: https://review.gerrithub.io/391582 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Daniel Verkamp --- examples/nvme/perf/perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/nvme/perf/perf.c b/examples/nvme/perf/perf.c index 2fabd7e71..4c1f5ab48 100644 --- a/examples/nvme/perf/perf.c +++ b/examples/nvme/perf/perf.c @@ -497,9 +497,9 @@ submit_single_io(struct perf_task *task) if (rc != 0) { fprintf(stderr, "starting I/O failed\n"); + } else { + ns_ctx->current_queue_depth++; } - - ns_ctx->current_queue_depth++; } static void