From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Yr1-0001Yx-6e for qemu-devel@nongnu.org; Tue, 27 Sep 2011 10:41:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8Yqz-0005Eb-CG for qemu-devel@nongnu.org; Tue, 27 Sep 2011 10:41:51 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:40626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Yqz-0005EM-7F for qemu-devel@nongnu.org; Tue, 27 Sep 2011 10:41:49 -0400 Received: by bkbzv15 with SMTP id zv15so7229554bkb.4 for ; Tue, 27 Sep 2011 07:41:48 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E81E0A8.20108@redhat.com> Date: Tue, 27 Sep 2011 16:41:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4E78C42D.5030207@siemens.com> <20110921080600.GA9847@stefanha-thinkpad.localdomain> <4E80B50B.9000301@siemens.com> <4E80B55F.5020203@redhat.com> <4E80BFF3.8000907@us.ibm.com> <4E8190BE.3000801@redhat.com> <4E81D609.1060203@siemens.com> <4E81D88B.4020504@codemonkey.ws> In-Reply-To: <4E81D88B.4020504@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi , Jan Kiszka , Marcelo Tosatti , qemu-devel , Avi Kivity On 09/27/2011 04:07 PM, Anthony Liguori wrote: > > I think it's a bit dangerous to implement eventfd() in terms of pipe(). > > 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(). But this is the same idiom we use for the iothread signaling. We're not using the eventfd's counter. Perhaps it would be nice to complete EventNotifier with "notify event" methods and use it, but Jan's patch is safe, I think. Paolo