qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] ISCSI: call qemu_notify_event() after updating


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 2/2] ISCSI: call qemu_notify_event() after updating events
Date: Tue, 22 May 2012 14:25:47 +0200

From: Ronnie Sahlberg <address@hidden>

Otherwise, If we add an event for -is-writeable but the socket is
already writeable there may be a delay before the event callback
is actually triggered.

Those delays would in particular hurt performance during BIOS boot and
when the GRUB bootloader reads the kernel and initrd.

Signed-off-by: Ronnie Sahlberg <address@hidden>
---
 block/iscsi.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/block/iscsi.c b/block/iscsi.c
index d37c4ee..f956824 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -109,6 +109,13 @@ iscsi_set_events(IscsiLun *iscsilun)
                            (iscsi_which_events(iscsi) & POLLOUT)
                            ? iscsi_process_write : NULL,
                            iscsi_process_flush, iscsilun);
+
+    /* If we just added the event for writeable we must call
+       and the socket is already writeable the callback might
+       not be invoked until after a short delay unless we call
+       qemu_notify_event().
+     */
+    qemu_notify_event();
 }
 
 static void
-- 
1.7.10.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]