Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <christophe.jaillet@wanadoo.fr>
Message-Id: <8f3d2e49270a2158717e15008e7ed7228196ba02.1676707807.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Peter Lafreniere <peter@n8pjl.ca>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

authored by

Christophe JAILLET and committed by
Michael S. Tsirkin
48cd6bc5 e4be66e5

+1 -1
+1 -1
include/linux/virtio.h
··· 34 34 unsigned int index; 35 35 unsigned int num_free; 36 36 unsigned int num_max; 37 - void *priv; 38 37 bool reset; 38 + void *priv; 39 39 }; 40 40 41 41 int virtqueue_add_outbuf(struct virtqueue *vq,