On 09/26/2011 12:24 PM, Avi Kivity wrote:
On 09/26/2011 08:23 PM, Jan Kiszka wrote:
>
> Perhaps qemu_eventfd() can be used in the future instead of an explicit
> pipe. Then Linux will do eventfd while other OSes will fall back to
> pipes.
Basically simpler code, or does this also have runtime benefits?
In corner cases, the completion can block on the write() with pipes, but not
eventfd.
The pipe is O_NONBLOCK and the only thing the caller cares about is whether
there is *some* data in the PIPE so it can happily ignore EAGAIN.
So the pipe implementation never blocks on write() either. It may require
multiple reads to drain the queue though whereas eventfd would only require a
single read to drain the queue.
Regards,
Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html