mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
nvmet: Reorder fields in 'struct nvmet_ns'
Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct nvmet_ns' from 520 to 512 bytes. When such a structure is allocated in nvmet_ns_alloc(), because of the way memory allocation works, when 520 bytes were requested, 1024 bytes were allocated. So, on x86_64, this change saves 512 bytes per allocation. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
d0dd594bed
commit
9d16d26477
@ -79,8 +79,8 @@ struct nvmet_ns {
|
||||
struct completion disable_done;
|
||||
mempool_t *bvec_pool;
|
||||
|
||||
int use_p2pmem;
|
||||
struct pci_dev *p2p_dev;
|
||||
int use_p2pmem;
|
||||
int pi_type;
|
||||
int metadata_size;
|
||||
u8 csi;
|
||||
|
Loading…
Reference in New Issue
Block a user