summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Wagner <dwagner@suse.de>2023-12-18 17:59:54 +0100
committerKeith Busch <kbusch@kernel.org>2023-12-19 09:10:13 -0800
commit963929615194d163a25e3b536cd990a05d7e9439 (patch)
tree97b72d232cfed6fe1cf47b239257a869d3f20a4c /drivers
parenta1a825ab6a60380240ca136596732fdb80bad87a (diff)
downloadlinux-963929615194d163a25e3b536cd990a05d7e9439.tar.gz
linux-963929615194d163a25e3b536cd990a05d7e9439.tar.bz2
linux-963929615194d163a25e3b536cd990a05d7e9439.zip
nvme: repack struct nvme_ns_head
ns_id, lba_shift and ms are always accessed for every read/write I/O in nvme_setup_rw. By grouping these variables into one cacheline we can safe some cycles. 4k sequential reads: baseline patched Bandwidth: 1620 1634 IOPs 66345579 66910939 Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/nvme.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 6211f18c53c7..3dbd187896d8 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -440,21 +440,21 @@ struct nvme_ns_head {
struct list_head list;
struct srcu_struct srcu;
struct nvme_subsystem *subsys;
- unsigned ns_id;
struct nvme_ns_ids ids;
struct list_head entry;
struct kref ref;
bool shared;
int instance;
struct nvme_effects_log *effects;
+ u64 nuse;
+ unsigned ns_id;
int lba_shift;
u16 ms;
u16 pi_size;
- u16 sgs;
- u32 sws;
- u64 nuse;
u8 pi_type;
u8 guard_type;
+ u16 sgs;
+ u32 sws;
#ifdef CONFIG_BLK_DEV_ZONED
u64 zsze;
#endif