qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-aio: increasing MAX_EVENTS to a larger hardcoded value
@ 2020-01-07  6:01 Wangyong
  2020-01-09 17:18 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Wangyong @ 2020-01-07  6:01 UTC (permalink / raw)
  To: Stefan Hajnoczi, pbonzini, mark.kanda, hch; +Cc: Changlimin, qemu-devel

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>
---
 block/linux-aio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/linux-aio.c b/block/linux-aio.c
index c7eca9a256..91204a25a2 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -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;
--
2.12.1.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux-aio: increasing MAX_EVENTS to a larger hardcoded value
  2020-01-07  6:01 [PATCH] linux-aio: increasing MAX_EVENTS to a larger hardcoded value Wangyong
@ 2020-01-09 17:18 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2020-01-09 17:18 UTC (permalink / raw)
  To: Wangyong; +Cc: pbonzini, Changlimin, hch, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

On Tue, Jan 07, 2020 at 06:01:01AM +0000, Wangyong wrote:
> 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>
> ---
>  block/linux-aio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

We discussed that long-terms solutions would take into account the queue
size of the emulated storage controllers associated with this
AioContext, but this is a first step that will improve performance.

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-09 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07  6:01 [PATCH] linux-aio: increasing MAX_EVENTS to a larger hardcoded value Wangyong
2020-01-09 17:18 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).