From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWoAG-00028w-PS for qemu-devel@nongnu.org; Tue, 22 May 2012 08:26:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWoA9-0004PK-Ji for qemu-devel@nongnu.org; Tue, 22 May 2012 08:26:12 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:63370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWoA9-0004M6-Ag for qemu-devel@nongnu.org; Tue, 22 May 2012 08:26:05 -0400 Received: by mail-pz0-f45.google.com with SMTP id v2so9911121dad.4 for ; Tue, 22 May 2012 05:26:04 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 22 May 2012 14:25:47 +0200 Message-Id: <1337689547-6338-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1337689547-6338-1-git-send-email-pbonzini@redhat.com> References: <1337689547-6338-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] ISCSI: call qemu_notify_event() after updating events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ronnie Sahlberg From: Ronnie Sahlberg 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 --- 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