Skip to content

Commit c60651e

Browse files
tititiou36keithbusch
authored andcommitted
nvmet: reorder fields in 'struct nvmet_sq'
Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct nvmet_sq' from 472 to 464 bytes when CONFIG_NVME_TARGET_AUTH is defined. This structure is embedded into some other structures, so it helps reducing their sizes as well. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent a249d30 commit c60651e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nvme/target/nvmet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ struct nvmet_sq {
109109
u32 sqhd;
110110
bool sqhd_disabled;
111111
#ifdef CONFIG_NVME_TARGET_AUTH
112-
struct delayed_work auth_expired_work;
113112
bool authenticated;
113+
struct delayed_work auth_expired_work;
114114
u16 dhchap_tid;
115115
u16 dhchap_status;
116116
int dhchap_step;

0 commit comments

Comments
 (0)