Commit 181de7bf authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme: reorder nvme_controller for better packing



After converting is_resetting to bool, it is smaller and can be packed
more efficiently with is_failed and reordered after the larger fields
used in the I/O path.

Change-Id: Ifa2301eb61ce8d38eb5412cca61d2a91b1474101
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent bc185fe7
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -233,13 +233,14 @@ struct nvme_controller {
	/** I/O queue pairs */
	struct nvme_qpair		*ioq;

	bool				is_resetting;
	/** Array of namespaces indexed by nsid - 1 */
	struct nvme_namespace		*ns;

	uint32_t			num_ns;

	/** Array of namespaces indexed by nsid - 1 */
	struct nvme_namespace		*ns;
	bool				is_resetting;

	bool				is_failed;

	/* Cold data (not accessed in normal I/O path) is after this point. */

@@ -262,8 +263,6 @@ struct nvme_controller {
	nvme_aer_cb_fn_t		aer_cb_fn;
	void				*aer_cb_arg;

	bool				is_failed;

	/** guards access to the controller itself, including admin queues */
	nvme_mutex_t			ctrlr_lock;