From: Christophe JAILLET Date: Sat, 18 Feb 2023 08:10:31 +0000 (+0100) Subject: virtio: Reorder fields in 'struct virtqueue' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=48cd6bc5b22d68b8bbc8601f3c7ddeed99541a0b;p=linux.git virtio: Reorder fields in 'struct virtqueue' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct virtqueue' from 72 to 68 bytes. It saves a few bytes of memory. Signed-off-by: Christophe JAILLET Message-Id: <8f3d2e49270a2158717e15008e7ed7228196ba02.1676707807.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Michael S. Tsirkin Acked-by: Peter Lafreniere Reviewed-by: Stefano Garzarella --- diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 2b472514c49b0..d6e161aa532ed 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -34,8 +34,8 @@ struct virtqueue { unsigned int index; unsigned int num_free; unsigned int num_max; - void *priv; bool reset; + void *priv; }; int virtqueue_add_outbuf(struct virtqueue *vq,