From: Paolo Bonzini <pbonzini@redhat.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes
Date: Tue, 22 May 2012 11:29:53 +0200 [thread overview]
Message-ID: <4FBB5C91.4060504@redhat.com> (raw)
In-Reply-To: <CAN05THTh4oQeo0cRZ8bjY4i7L8TNNsY0mNJuDyjJzW7NBZ_V9g@mail.gmail.com>
Il 22/05/2012 11:15, ronnie sahlberg ha scritto:
> Hi,
>
> Now that I see what happens, I can easily workaround this in block/iscsi.c
> by the patch below, but I dont know if this is the right thing to do.
>
> It does appear that here, when I use qemu_set_fd_handler() and add a
> handler for "writeble" it takes 55ms before the event system notices
> this and reacts.
>
>
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index d37c4ee..1ebff0f 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -105,6 +105,10 @@ iscsi_set_events(IscsiLun *iscsilun)
> {
> struct iscsi_context *iscsi = iscsilun->iscsi;
>
> + if (iscsi_which_events(iscsi) & POLLOUT) {
> + iscsi_process_write(iscsilun);
> + }
> +
> qemu_aio_set_fd_handler(iscsi_get_fd(iscsi), iscsi_process_read,
> (iscsi_which_events(iscsi) & POLLOUT)
> ? iscsi_process_write : NULL,
Doh, now I remember. Whenever you change the aio handlers you need to
call qemu_notify_event() afterwards, if the handler may fire right away.
The alternative is your patch, which is correct. Can you resend it
with SoB?
Paolo
next prev parent reply other threads:[~2012-05-22 9:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 6:07 [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes ronnie sahlberg
2012-05-21 10:45 ` Kevin Wolf
2012-05-21 10:59 ` Paolo Bonzini
2012-05-21 11:00 ` ronnie sahlberg
2012-05-21 13:20 ` Stefan Hajnoczi
2012-05-22 9:07 ` ronnie sahlberg
2012-05-22 9:15 ` Paolo Bonzini
2012-05-22 9:15 ` ronnie sahlberg
2012-05-22 9:29 ` Paolo Bonzini [this message]
2012-05-22 9:48 ` ronnie sahlberg
2012-05-22 10:03 ` ronnie sahlberg
2012-05-22 16:31 ` Michael Tokarev
2012-05-25 6:53 ` ronnie sahlberg
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=4FBB5C91.4060504@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@gmail.com \
--cc=stefanha@linux.vnet.ibm.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).