qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO
Date: Tue, 27 Sep 2011 09:38:25 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

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 via email to

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