value of VIRTQUEUE_MAX_SIZE
Hi,
Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should not be equal to IOV_MAX instead of the hardcoded 1024?
Thanks,
Peter
Quoted 1 line · Peter Lieven
Just wondering if
VIRTQUEUE_MAX_SIZEininclude/hw/virtio/virtio.hshould not be equal toIOV_MAXinstead of the hardcoded 1024?
The vring queue size is guest-visible to some extent (e.g. vring memory layout). Tying it to a constant that is defined by the host operating system could lead to problems (e.g. live migration between different hosts).
Anyway, all of the virtio devices have a queue size that is less than or equal to VIRTQUEUE_MAX_SIZE (and there is an assertion to check this in virtio_add_queue()).
Guests are supposed to honor the vring queue size, although indirect descriptors seem to be able to use up to VIRTQUEUE_MAX_SIZE according to my understanding of QEMU's virtio.c code.
Why would you like to use IOV_MAX?
Stefan
Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi:
Quoted 11 lines · Peter Lieven
Quoted 1 line
Just wondering if
VIRTQUEUE_MAX_SIZEininclude/hw/virtio/virtio.hshould not be equal toIOV_MAXinstead of the hardcoded 1024?The vring queue size is guest-visible to some extent (e.g. vring memory layout). Tying it to a constant that is defined by the host operating system could lead to problems (e.g. live migration between different hosts).
Anyway, all of the virtio devices have a queue size that is less than or equal to
VIRTQUEUE_MAX_SIZE(and there is an assertion to check this invirtio_add_queue()).
Quoted 5 lines
Guests are supposed to honor the vring queue size, although indirect descriptors seem to be able to use up to
VIRTQUEUE_MAX_SIZEaccording to my understanding of QEMU'svirtio.ccode.Why would you like to use
IOV_MAX?
The idea was that IOV_MAX is the limit in case of at least virtio-blk. The host will not support more than IOV_MAX iovecs passed to a block request.
Peter
Quoted 12 lines · Peter Lieven
Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi:
Quoted 11 lines · Peter Lieven
Quoted 1 line
Just wondering if
VIRTQUEUE_MAX_SIZEininclude/hw/virtio/virtio.hshould not be equal toIOV_MAXinstead of the hardcoded 1024?The vring queue size is guest-visible to some extent (e.g. vring memory layout). Tying it to a constant that is defined by the host operating system could lead to problems (e.g. live migration between different hosts).
Anyway, all of the virtio devices have a queue size that is less than or equal to
VIRTQUEUE_MAX_SIZE(and there is an assertion to check this invirtio_add_queue()).
Quoted 8 lines
Quoted 5 lines
Guests are supposed to honor the vring queue size, although indirect descriptors seem to be able to use up to
VIRTQUEUE_MAX_SIZEaccording to my understanding of QEMU'svirtio.ccode.Why would you like to use
IOV_MAX?The idea was that
IOV_MAXis the limit in case of at least virtio-blk. The host will not support more thanIOV_MAXiovecs passed to a block request.
Is there an issue in practice?
Stefan
Am 06.02.2015 um 11:42 schrieb Stefan Hajnoczi:
Quoted 13 lines · Peter Lieven
Quoted 12 lines
Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi:
Quoted 11 lines · Peter Lieven
Quoted 1 line
Just wondering if
VIRTQUEUE_MAX_SIZEininclude/hw/virtio/virtio.hshould not be equal toIOV_MAXinstead of the hardcoded 1024?The vring queue size is guest-visible to some extent (e.g. vring memory layout). Tying it to a constant that is defined by the host operating system could lead to problems (e.g. live migration between different hosts).
Anyway, all of the virtio devices have a queue size that is less than or equal to
VIRTQUEUE_MAX_SIZE(and there is an assertion to check this invirtio_add_queue()).
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Guests are supposed to honor the vring queue size, although indirect descriptors seem to be able to use up to
VIRTQUEUE_MAX_SIZEaccording to my understanding of QEMU'svirtio.ccode.Why would you like to use
IOV_MAX?The idea was that
IOV_MAXis the limit in case of at least virtio-blk. The host will not support more thanIOV_MAXiovecs passed to a block request.Is there an issue in practice?
If there is no platform where IOV_MAX is less than 1024 then not.
Peter
Quoted 5 lines · Peter Lieven
Quoted 3 lines
Quoted 2 lines
The idea was that
IOV_MAXis the limit in case of at least virtio-blk. The host will not support more thanIOV_MAXiovecs passed to a block request.Is there an issue in practice?
If there is no platform where
IOV_MAXis less than 1024 then not.
POSIX allows for a system with IOV_MAX as small as 16. But these days, systems we care about probably have a much larger value; alas, I don't know off-hand what actual systems use to say if 1024 is a common minimum.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org