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 <james.r.harris@intel.com>
Change-Id: I5d90d41e5142622b79d9765fbc62da1516e2b8be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10189
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@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 12:47:02 -07:00 committed by Tomasz Zawadzki
parent 6a298e87f1
commit d1df8a1617

View File

@ -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);