ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.
PATCH 1/1 ISCSI: We need to call qemu_notify_event() everytime we update which events we need to be notified for.
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.
--- block/iscsi.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
block/iscsi.c +7 -0
@@ -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
Signature · 1 line
1.7.3.1
Paolo Bonzini
AppliedIl 22/05/2012 11:56, Ronnie Sahlberg ha scritto:
Quoted 17 lines
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 <[email protected]>--- block/iscsi.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)block/iscsi.c +0
-0@@ -109,6 +109,13 @@ iscsi_set_events(IscsiLun *iscsilun) (iscsi_which_events (iscsi) &POLLOUT ) ? iscsi_process_write :NULL , iscsi_process_flush, iscsilun);
block/iscsi.c iscsi_set_events(IscsiLun *iscsilun) · line 121
Quoted 10 lines
block/iscsi.c +7
-0+ +/* 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