qemu-e2k/include/sysemu
Paolo Bonzini cc07162953 block: introduce max_hw_iov for use in scsi-generic
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: 18473467d5 ("file-posix: try BLKSECTGET on block devices too, do not round to power of 2", 2021-06-25)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210923130436.1187591-1-pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-10-06 10:25:55 +02:00
..
accel-ops.h
arch_init.h
balloon.h
block-backend.h block: introduce max_hw_iov for use in scsi-generic 2021-10-06 10:25:55 +02:00
blockdev.h
cpu-throttle.h
cpu-timers.h
cpus.h
cryptodev-vhost-user.h
cryptodev-vhost.h
cryptodev.h
device_tree.h
dma.h
dump-arch.h
dump.h
hax.h
hostmem.h
hvf_int.h
hvf.h
hw_accel.h
iothread.h
kvm_int.h memory: Name all the memory listeners 2021-09-30 15:30:24 +02:00
kvm.h
memory_mapping.h
numa.h
nvmm.h
os-posix.h
os-win32.h
qtest.h
replay.h
reset.h
rng-random.h
rng.h
runstate-action.h
runstate.h
seccomp.h
sev.h
sysemu.h
tcg.h
tpm_backend.h
tpm_util.h
tpm.h
vhost-user-backend.h
watchdog.h
whpx.h
xen-mapcache.h
xen.h