Commit a97200ad authored by Jim Harris's avatar Jim Harris
Browse files

nvme: optimize struct spdk_nvme_qpair packing



Group fields such that those not used in the I/O path
are at the end of the structure.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I43eca1faacd29a5bf34be6ee644191d865cd42a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11514


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 56618eac
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -455,7 +455,6 @@ struct spdk_nvme_qpair {

	STAILQ_HEAD(, nvme_request)		free_req;
	STAILQ_HEAD(, nvme_request)		queued_req;
	STAILQ_HEAD(, nvme_request)		aborting_queued_req;

	/* List entry for spdk_nvme_transport_poll_group::qpairs */
	STAILQ_ENTRY(spdk_nvme_qpair)		poll_group_stailq;
@@ -465,23 +464,27 @@ struct spdk_nvme_qpair {
	/** Requests in this list will return error */
	STAILQ_HEAD(, nvme_request)		err_req_head;

	/* List entry for spdk_nvme_ctrlr::active_io_qpairs */
	TAILQ_ENTRY(spdk_nvme_qpair)		tailq;

	/* List entry for spdk_nvme_ctrlr_process::allocated_io_qpairs */
	TAILQ_ENTRY(spdk_nvme_qpair)		per_process_tailq;

	struct spdk_nvme_ctrlr_process		*active_proc;

	struct spdk_nvme_transport_poll_group	*poll_group;

	void					*poll_group_tailq_head;

	void					*req_buf;

	const struct spdk_nvme_transport	*transport;

	/* Entries below here are not touched in the main I/O path. */

	struct nvme_completion_poll_status	*poll_status;

	/* List entry for spdk_nvme_ctrlr::active_io_qpairs */
	TAILQ_ENTRY(spdk_nvme_qpair)		tailq;

	/* List entry for spdk_nvme_ctrlr_process::allocated_io_qpairs */
	TAILQ_ENTRY(spdk_nvme_qpair)		per_process_tailq;

	STAILQ_HEAD(, nvme_request)		aborting_queued_req;

	void					*req_buf;
};

struct spdk_nvme_poll_group {