Commit 0b252a70 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

Revert "nvmf: only poll admin queue once every 10 ms"



This is causing issues during shutdown because the poller removal is not
synchronized with the rest of the cleanup path.

This reverts commit 7dfc5e92.

Change-Id: If95c4b72c5d120f18bdc3db6d7d532ad1aada642
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 00223042
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -49,15 +49,10 @@ nvmf_direct_ctrlr_get_data(struct nvmf_session *session)
}

static void
nvmf_direct_ctrlr_poll_for_io_completions(struct nvmf_session *session)
{
	spdk_nvme_qpair_process_completions(session->subsys->ctrlr.dev.direct.io_qpair, 0);
}

static void
nvmf_direct_ctrlr_poll_for_admin_completions(struct nvmf_session *session)
nvmf_direct_ctrlr_poll_for_completions(struct nvmf_session *session)
{
	spdk_nvme_ctrlr_process_admin_completions(session->subsys->ctrlr.dev.direct.ctrlr);
	spdk_nvme_qpair_process_completions(session->subsys->ctrlr.dev.direct.io_qpair, 0);
}

static void
@@ -256,6 +251,5 @@ const struct spdk_nvmf_ctrlr_ops spdk_nvmf_direct_ctrlr_ops = {
	.ctrlr_get_data			= nvmf_direct_ctrlr_get_data,
	.process_admin_cmd		= nvmf_direct_ctrlr_process_admin_cmd,
	.process_io_cmd			= nvmf_direct_ctrlr_process_io_cmd,
	.poll_for_io_completions	= nvmf_direct_ctrlr_poll_for_io_completions,
	.poll_for_admin_completions	= nvmf_direct_ctrlr_poll_for_admin_completions,
	.poll_for_completions		= nvmf_direct_ctrlr_poll_for_completions,
};
+1 −21
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@
#include "spdk/trace.h"
#include "spdk/nvmf_spec.h"

#define ADMIN_POLL_MICROSECONDS 10000 /* 10 milliseconds */

static TAILQ_HEAD(, spdk_nvmf_subsystem) g_subsystems = TAILQ_HEAD_INITIALIZER(g_subsystems);

struct spdk_nvmf_subsystem *
@@ -87,29 +85,13 @@ spdk_nvmf_subsystem_poller(void *arg)

	/* For NVMe subsystems, check the backing physical device for completions. */
	if (subsystem->subtype == SPDK_NVMF_SUBTYPE_NVME) {
		session->subsys->ctrlr.ops->poll_for_io_completions(session);
		session->subsys->ctrlr.ops->poll_for_completions(session);
	}

	/* For each connection in the session, check for RDMA completions */
	spdk_nvmf_session_poll(session);
}

static void
spdk_nvmf_subsystem_admin_poll(void *arg)
{
	struct spdk_nvmf_subsystem *subsystem = arg;
	struct nvmf_session *session = subsystem->session;

	if (!session) {
		/* No active connections, so just return */
		return;
	}

	if (subsystem->subtype == SPDK_NVMF_SUBTYPE_NVME) {
		session->subsys->ctrlr.ops->poll_for_admin_completions(session);
	}
}

struct spdk_nvmf_subsystem *
nvmf_create_subsystem(int num, const char *name,
		      enum spdk_nvmf_subtype subtype,
@@ -132,8 +114,6 @@ nvmf_create_subsystem(int num, const char *name,

	subsystem->lcore = lcore;
	spdk_poller_register(&subsystem->poller, spdk_nvmf_subsystem_poller, subsystem, lcore, NULL, 0);
	spdk_poller_register(&subsystem->admin_poller, spdk_nvmf_subsystem_admin_poll, subsystem,
			     lcore, NULL, ADMIN_POLL_MICROSECONDS);

	TAILQ_INSERT_HEAD(&g_subsystems, subsystem, entries);

+2 −8
Original line number Diff line number Diff line
@@ -88,14 +88,9 @@ struct spdk_nvmf_ctrlr_ops {
	int (*process_io_cmd)(struct spdk_nvmf_request *req);

	/**
	 * Poll for I/O completions.
	 * Poll for completions.
	 */
	void (*poll_for_io_completions)(struct nvmf_session *session);

	/**
	 * Poll for admin completions.
	 */
	void (*poll_for_admin_completions)(struct nvmf_session *session);
	void (*poll_for_completions)(struct nvmf_session *session);
};

struct spdk_nvmf_controller {
@@ -132,7 +127,6 @@ struct spdk_nvmf_subsystem {
	struct spdk_nvmf_controller 	ctrlr;

	struct spdk_poller			*poller;
	struct spdk_poller			*admin_poller;

	TAILQ_HEAD(, spdk_nvmf_listen_addr)	listen_addrs;
	uint32_t				num_listen_addrs;