qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO
Date: Tue, 27 Sep 2011 09:38:25 -0500	[thread overview]
Message-ID: <4E81DFE1.2090805@codemonkey.ws> (raw)
In-Reply-To: <4E81DC35.2040007@siemens.com>

On 09/27/2011 09:22 AM, Jan Kiszka wrote:
> On 2011-09-27 16:19, Anthony Liguori wrote:
>> On 09/27/2011 09:11 AM, Avi Kivity wrote:
>>> On 09/27/2011 05:07 PM, Anthony Liguori wrote:
>>>>
>>>> You don't expect to handle EAGAIN with eventfd() whereas you have to handle it
>>>> with pipe().
>>>>
>>>> Moreover, the eventfd() counter is not lossy (practically speaking) whereas if
>>>> you use pipe() as a counter, it will be lossy in practice.
>>>>
>>>> This is why posix aio uses pipe() and not eventfd().
>>>
>>> We could define a qemu_event mechanism that satisfies the least common
>>> denominator, and is implemented by eventfd when available.
>>>
>>> qemu_event_create()
>>> qemu_event_signal()
>>> qemu_event_wait()
>>> qemu_event_poll_add() // registers in main loop
>>> qemu_event_poll_del()
>>
>> See hw/event_notifier.[ch].
>
> That code looks suspicious, btw. It claims things ("we use
> EFD_SEMAPHORE") it does not do.

Indeed.

But the interface appears to be the right one IMHO.

Regards,

Anthony Liguori

>
> Jan
>

  reply	other threads:[~2011-09-27 14:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E78C42D.5030207@siemens.com>
     [not found] ` <20110921080600.GA9847@stefanha-thinkpad.localdomain>
     [not found]   ` <4E80B50B.9000301@siemens.com>
     [not found]     ` <4E80B55F.5020203@redhat.com>
     [not found]       ` <4E80BFF3.8000907@us.ibm.com>
     [not found]         ` <4E8190BE.3000801@redhat.com>
2011-09-27 13:56           ` [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO Jan Kiszka
2011-09-27 14:07             ` Anthony Liguori
2011-09-27 14:11               ` Avi Kivity
2011-09-27 14:19                 ` Anthony Liguori
2011-09-27 14:22                   ` Avi Kivity
2011-09-27 14:22                   ` Jan Kiszka
2011-09-27 14:38                     ` Anthony Liguori [this message]
2011-09-27 14:29               ` Jan Kiszka
2011-09-27 14:34                 ` Avi Kivity
2011-09-27 14:36                   ` Jan Kiszka
2011-09-27 14:42                     ` Avi Kivity
2011-09-27 14:45                       ` Jan Kiszka
2011-09-27 14:48                         ` Avi Kivity
2011-09-27 14:50                           ` Jan Kiszka
2011-09-27 14:54                             ` Avi Kivity
2011-09-27 14:57                               ` Anthony Liguori
2011-09-27 14:59                               ` Jan Kiszka
2011-09-27 14:36                 ` Anthony Liguori
2011-09-27 14:41               ` 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=4E81DFE1.2090805@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kwolf@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).