mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-20 06:28:36 -07:00
Linux limits the size of iovecs to 1024 (UIO_MAXIOV in the kernel
sources, IOV_MAX in POSIX). Because of this, on some host adapters
requests with many iovecs are rejected with -EINVAL by the
io_submit() or readv()/writev() system calls.
In fact, the same limit applies to SG_IO as well. To fix both the
EINVAL and the possible performance issues from using fewer iovecs
than allowed by Linux (some HBAs have max_segments as low as 128),
introduce a separate entry in BlockLimits to hold the max_segments
value from sysfs. This new limit is used only for SG_IO and clamped
to bs->bl.max_iov anyway, just like max_hw_transfer is clamped to
bs->bl.max_transfer.
Reported-by: Halil Pasic <pasic@linux.ibm.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org
Cc: qemu-stable@nongnu.org
Fixes:
|
||
|---|---|---|
| .. | ||
| accounting.h | ||
| aio-wait.h | ||
| aio.h | ||
| aio_task.h | ||
| block-copy.h | ||
| block-hmp-cmds.h | ||
| block.h | ||
| block_backup.h | ||
| block_int.h | ||
| blockjob.h | ||
| blockjob_int.h | ||
| dirty-bitmap.h | ||
| export.h | ||
| fuse.h | ||
| nbd.h | ||
| nvme.h | ||
| qapi.h | ||
| qdict.h | ||
| raw-aio.h | ||
| replication.h | ||
| snapshot.h | ||
| thread-pool.h | ||
| throttle-groups.h | ||
| write-threshold.h | ||