qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Subject: [Qemu-devel] [PATCH 2/2] ISCSI: call qemu_notify_event() after updating events
Date: Tue, 22 May 2012 14:25:47 +0200	[thread overview]
Message-ID: <1337689547-6338-3-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1337689547-6338-1-git-send-email-pbonzini@redhat.com>

From: Ronnie Sahlberg <ronniesahlberg@gmail.com>

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 <ronniesahlberg@gmail.com>
---
 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

  parent reply	other threads:[~2012-05-22 12:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 12:25 [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3 Paolo Bonzini
2012-05-22 12:25 ` [Qemu-devel] [PATCH 1/2] scsi: declare vmstate_info_scsi_requests to be static Paolo Bonzini
2012-05-22 12:25 ` Paolo Bonzini [this message]
2012-05-25 11:11 ` [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3 Paolo Bonzini
2012-05-26  5:41   ` ronnie sahlberg
2012-05-26  7:46     ` Paolo Bonzini
2012-05-26  7:59       ` ronnie sahlberg
2012-05-26  8:17         ` ronnie sahlberg
2012-05-26  9:18           ` ronnie sahlberg
2012-05-28  6:46             ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337689547-6338-3-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).