From b9510b6437ae15c3a5c923f9582e444ec7c5b03b Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 11 Nov 2021 12:47:02 -0700 Subject: [PATCH] idxd: don't limit number of completions per poll This limitation doesn't really take effect currently, since the typical number of slots per channel isn't bigger than MAX_COMPLETIONS_PER_POLL. But there's no reason for this limit anymore - we should always poll as many completions as we find. It's better to remove this now, in case we have configs in the future with higher number of slots per channel. Signed-off-by: Jim Harris Change-Id: I5d90d41e5142622b79d9765fbc62da1516e2b8be Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10189 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: John Kariuki Reviewed-by: Monica Kenguva Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki --- lib/idxd/idxd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 5bd35a81d..0b5ed96fc 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -47,11 +47,6 @@ #define ALIGN_4K 0x1000 #define USERSPACE_DRIVER_NAME "user" #define KERNEL_DRIVER_NAME "kernel" -/* - * Need to limit how many completions we reap in one poller to avoid starving - * other threads as callers can submit new operations on the polling thread. - */ -#define MAX_COMPLETIONS_PER_POLL 16 static STAILQ_HEAD(, spdk_idxd_impl) g_idxd_impls = STAILQ_HEAD_INITIALIZER(g_idxd_impls); static struct spdk_idxd_impl *g_idxd_impl; @@ -1120,10 +1115,6 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan) assert(chan != NULL); TAILQ_FOREACH_SAFE(op, &chan->ops_outstanding, link, tmp) { - if (rc == MAX_COMPLETIONS_PER_POLL) { - break; - } - if (IDXD_COMPLETION(op->hw.status)) { TAILQ_REMOVE(&chan->ops_outstanding, op, link);