From: ronnie sahlberg <ronniesahlberg@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.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 19:48:39 +1000 [thread overview]
Message-ID: <CAN05THSfrtm1NGQRANiUgj-sihzuOwudu3CPduKAevhf1Cndng@mail.gmail.com> (raw)
In-Reply-To: <4FBB5C91.4060504@redhat.com>
On Tue, May 22, 2012 at 7:29 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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.
Thanks. I just confirmed that qemu_notify_event() fixes the issue.
Ill send a patch that uses qemu_notify_event() and a comment why this is needed.
regards
ronnie sahlberg
next prev parent reply other threads:[~2012-05-22 9:48 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
2012-05-22 9:48 ` ronnie sahlberg [this message]
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=CAN05THSfrtm1NGQRANiUgj-sihzuOwudu3CPduKAevhf1Cndng@mail.gmail.com \
--to=ronniesahlberg@gmail.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).