* [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.
@ 2012-05-22 9:56 Ronnie Sahlberg
2012-05-22 12:13 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Ronnie Sahlberg @ 2012-05-22 9:56 UTC (permalink / raw)
To: qemu-devel, kwolf, pbonzini; +Cc: Ronnie Sahlberg
Otherwise, If we add an event for -is-writeable but the socket is already writeable there may be a short 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 <ronniesahlberg@gmail.com>
---
block/iscsi.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.
2012-05-22 9:56 [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for Ronnie Sahlberg
@ 2012-05-22 12:13 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2012-05-22 12:13 UTC (permalink / raw)
To: qemu-devel
Il 22/05/2012 11:56, Ronnie Sahlberg ha scritto:
> Otherwise, If we add an event for -is-writeable but the socket is already writeable there may be a short 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 <ronniesahlberg@gmail.com>
> ---
> block/iscsi.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> 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
Thanks, applied to SCSI branch for 1.1.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-22 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 9:56 [Qemu-devel] [PATCH] ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for Ronnie Sahlberg
2012-05-22 12:13 ` Paolo Bonzini
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).