nvme/pci: Reorder nvme_queue members
The nvme_queue members can now be reordered to pack all the IO
hot accesses into a single cache line.
Signed-off-by: Keith Busch <keith.busch@intel.com>
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index c5b84fa..1cf3f55 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -178,13 +178,12 @@
*/
struct nvme_queue {
struct nvme_dev *dev;
- spinlock_t sq_lock;
struct nvme_command *sq_cmds;
volatile struct nvme_completion *cqes;
struct blk_mq_tags **tags;
- dma_addr_t sq_dma_addr;
- dma_addr_t cq_dma_addr;
u32 __iomem *q_db;
+ unsigned long flags;
+ spinlock_t sq_lock;
u16 q_depth;
u16 cq_vector;
u16 sq_tail;
@@ -192,11 +191,12 @@
u16 qid;
u8 cq_phase;
u8 polling;
- unsigned long flags;
#define NVMEQ_ENABLED 0
#define NVMEQ_SQ_CMB 1
#define NVMEQ_DELETE_ERROR 2
#define NVMEQ_POLLED 3
+ dma_addr_t sq_dma_addr;
+ dma_addr_t cq_dma_addr;
u32 *dbbuf_sq_db;
u32 *dbbuf_cq_db;
u32 *dbbuf_sq_ei;