linux-aio: increasing MAX_EVENTS to a larger hardcoded value
authorWangyong <wang.yongD@h3c.com>
Tue, 7 Jan 2020 06:01:01 +0000 (06:01 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 13 Jan 2020 16:41:45 +0000 (16:41 +0000)
Since commit 6040aedddb5f474a9c2304b6a432a652d82b3d3c "virtio-blk:
make queue size configurable",if the user set the queue size to
more than 128 ,it will not take effect. That's because linux aio's
maximum outstanding requests at a time is always less than or equal
to 128.

This patch simply increase MAX_EVENTS to a larger hardcoded value of
1024 as a shortterm fix.

Signed-off-by: wangyong <wang.yongD@h3c.com>
Message-id: faa5781afd354a96a0be152b288f636f@h3c.com
Message-Id: <faa5781afd354a96a0be152b288f636f@h3c.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/linux-aio.c

index c7eca9a256c1952b731b97073c718625fbe9d65e..91204a25a2b42a9aa0f2e0e116ae144ce2d66a9b 100644 (file)
@@ -26,7 +26,7 @@
  *      than this we will get EAGAIN from io_submit which is communicated to
  *      the guest as an I/O error.
  */
-#define MAX_EVENTS 128
+#define MAX_EVENTS 1024
 
 struct qemu_laiocb {
     Coroutine *co;