Am 01.06.2017 um 18:54 schrieb Paolo Bonzini:
>
> On 01/06/2017 16:25, Peter Lieven wrote:
>>>      DEFINE_PROP_UINT32("max_sectors", VirtIOSCSI,
>>>                         parent_obj.conf.max_sectors,
>>>                         0xFFFF),
>>>
>>> We could increase it now that we have support for max_xfer_len
>>> passthrough.
>> 0xFFFF * 512 is 32MB - 512 byte. This should not limit 1M requests?!
> Yeah, I cannot do math apparently.  Someone needs to debug the guest and
> see where the strange 504K limit comes from.

Okay, here comes the root cause. The kernel honours the max_sectors limit
of 1024 sectors (=512KB), but in virtio-blk we have request merging enabled
per default. If I disable it I get the same strange pattern 516096 + 516096 + 
16384
Byte. If I increase the limit to 2048 sectors, 1M requests go through for 
virtio-blk
and virtio-scsi.

But whats strange is that the kernel properly splits 1M requests into 2* 512KB 
for
IDE, but fails to do so for virtio-blk and virtio-scsi.

Side question: What is needed (Qemu Version and Guest Kernel) to get the 
max_requests limit
in the kernel based on max_xfer_len?

My testing is with Qemu 2.9.0 and Debian 8 (3.16 kernel)

Thanks,
Peter


Reply via email to