Commit 2e8ae729 authored by paul luse's avatar paul luse Committed by Jim Harris
Browse files

lib/idxd: stop polling on the first uncompleted location



We already keep a list of outstanding completion locations to
poll and were previously polling all of them.  New ones are
added at the tail and we poll the oldest first from the head
so if we break when we find a slot that hasn't completed we
can get more work done while the HW finishes. This is a proven
performance improvement in limited testing.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: Icc15041605586f9a31435d447d253c381c00b1f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8161


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent c52e7007
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1070,6 +1070,13 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan)
					_free_batch(comp_ctx->batch, chan);
				}
			}
		} else {
			/*
			 * oldest locations are at the head of the list so if
			 * we've polled a location that hasn't completed, bail
			 * now as there are unlikely to be any more completions.
			 */
			break;
		}
	}
	return rc;