qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]