Re: [PATCH 2/5] nvmet: Reorder fields in 'struct nvme_ctrl'

From: Keith Busch
Date: Mon May 15 2023 - 10:22:32 EST


On Mon, May 01, 2023 at 02:40:26PM +0200, Christophe JAILLET wrote:
> Group some variables based on their sizes to reduce holes.
> On x86_64, this shrinks the size of 'struct nvmet_sq' from 5368 to 5344
> bytes when all CONFIG_* are defined.

This patch is changing struct nvme_ctrl but the commit log only mentions
struct nvmet_sq, which was handled in patch 1/5. I'll just fix that up
when applying.

> This structure is embedded into some other structures, so it helps reducing
> their size as well.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> Using pahole
>
> Before:
> ======
> struct nvme_ctrl {
> bool comp_seen; /* 0 1 */