qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux aio: some comments
@ 2011-08-30  7:46 Frediano Ziglio
  2011-08-30  7:58 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Frediano Ziglio @ 2011-08-30  7:46 UTC (permalink / raw)
  To: kwolf; +Cc: qemu-devel, Frediano Ziglio

Add some notes about Linux AIO explaining why we don't use AIO in
some situations.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 block/raw-posix.c |    4 ++++
 linux-aio.c       |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/block/raw-posix.c b/block/raw-posix.c
index c5c9944..bcf50b2 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -236,6 +236,10 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
     }
 
 #ifdef CONFIG_LINUX_AIO
+    /*
+     * Currently Linux do AIO only for files opened with O_DIRECT
+     * specified so check NOCACHE flag too
+     */
     if ((bdrv_flags & (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) ==
                       (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) {
 
diff --git a/linux-aio.c b/linux-aio.c
index 5fd3932..5265a02 100644
--- a/linux-aio.c
+++ b/linux-aio.c
@@ -181,6 +181,7 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
     case QEMU_AIO_READ:
         io_prep_preadv(iocbs, fd, qiov->iov, qiov->niov, offset);
 	break;
+    /* Currently Linux kernel does not support other operations */
     default:
         fprintf(stderr, "%s: invalid AIO request type 0x%x.\n",
                         __func__, type);
-- 
1.7.1

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

* Re: [Qemu-devel] [PATCH] linux aio: some comments
  2011-08-30  7:46 [Qemu-devel] [PATCH] linux aio: some comments Frediano Ziglio
@ 2011-08-30  7:58 ` Kevin Wolf
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2011-08-30  7:58 UTC (permalink / raw)
  To: Frediano Ziglio; +Cc: qemu-devel

Am 30.08.2011 09:46, schrieb Frediano Ziglio:
> Add some notes about Linux AIO explaining why we don't use AIO in
> some situations.
> 
> Signed-off-by: Frediano Ziglio <freddy77@gmail.com>

Thanks, applied to the block branch.

Kevin

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

end of thread, other threads:[~2011-08-30  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-30  7:46 [Qemu-devel] [PATCH] linux aio: some comments Frediano Ziglio
2011-08-30  7:58 ` Kevin Wolf

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).