qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback
Date: Thu, 05 Jun 2014 19:29:09 +0200	[thread overview]
Message-ID: <5390A8E5.2080602@redhat.com> (raw)
In-Reply-To: <538E0C19.5030108@redhat.com>

On 03.06.2014 19:55, Paolo Bonzini wrote:
> Il 31/05/2014 20:43, Max Reitz ha scritto:
>> @@ -108,7 +120,9 @@ bool aio_pending(AioContext *ctx)
>>          int revents;
>>
>>          revents = node->pfd.revents & node->pfd.events;
>> -        if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && 
>> node->io_read) {
>> +        if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && 
>> node->io_read &&
>> +            (!node->io_read_poll || node->io_read_poll(node->opaque)))
>> +        {
>>              return true;
>>          }
>
> This would cause a busy loop whenever io_read_poll returns false. You 
> would  need to call io_read_poll when you fill the pollfds array, i.e. 
> in aio_poll and aio_ctx_prepare.

Thanks; considering Stefan's comment, I'll see whether I can get away 
without implement io_read_poll().

Max

> Paolo

  reply	other threads:[~2014-06-05 17:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1401561792-13410-1-git-send-email-mreitz@redhat.com>
2014-06-03 14:38 ` [Qemu-devel] [RFC 0/5] nbd: Adapt for dataplane Stefan Hajnoczi
2014-06-05 17:41   ` Max Reitz
     [not found] ` <1401561792-13410-2-git-send-email-mreitz@redhat.com>
2014-06-04 11:52   ` [Qemu-devel] [RFC 1/5] nbd: Correct name comparison for export_set_name() Stefan Hajnoczi
2014-06-05 17:28     ` Max Reitz
     [not found] ` <1401561792-13410-3-git-send-email-mreitz@redhat.com>
2014-06-03 17:55   ` [Qemu-devel] [RFC 2/5] aio: Add io_read_poll() callback Paolo Bonzini
2014-06-05 17:29     ` Max Reitz [this message]
2014-06-04 11:59   ` Stefan Hajnoczi
     [not found] ` <1401561792-13410-4-git-send-email-mreitz@redhat.com>
2014-06-04 12:37   ` [Qemu-devel] [RFC 3/5] nbd: Use aio_set_fd_handler2() Stefan Hajnoczi
2014-06-04 18:02     ` Paolo Bonzini
2014-06-05  8:12       ` Stefan Hajnoczi
2014-06-05  9:27         ` Paolo Bonzini
2014-06-05 13:32           ` Stefan Hajnoczi
2014-06-05 18:18     ` Max Reitz
2014-06-06  7:44       ` Paolo Bonzini
2014-06-07 19:27         ` Max Reitz
2014-06-09 13:35           ` Stefan Hajnoczi
     [not found] ` <1401561792-13410-5-git-send-email-mreitz@redhat.com>
2014-06-04 12:41   ` [Qemu-devel] [RFC 4/5] block: Add AIO followers Stefan Hajnoczi
2014-06-05 17:31     ` Max Reitz
     [not found] ` <538A3A8F.3060508@redhat.com>
2014-06-04 12:47   ` [Qemu-devel] [RFC 0/5] nbd: Adapt for dataplane Stefan Hajnoczi
2014-06-04 12:50 ` Stefan Hajnoczi

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=5390A8E5.2080602@redhat.com \
    --to=mreitz@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).