From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlLgH-0004bI-FF for qemu-devel@nongnu.org; Sun, 01 Jul 2012 11:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlLgF-0001Z3-MN for qemu-devel@nongnu.org; Sun, 01 Jul 2012 11:03:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlLgF-0001Yv-EP for qemu-devel@nongnu.org; Sun, 01 Jul 2012 11:03:19 -0400 Message-ID: <4FF066AF.40606@redhat.com> Date: Sun, 01 Jul 2012 17:03:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4FF02F2C.30006@ozlabs.ru> <4FF05173.6090801@redhat.com> <4FF05369.20405@ozlabs.ru> <4FF062BC.4090200@ozlabs.ru> In-Reply-To: <4FF062BC.4090200@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QEMU question: is eventfd not thread safe? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Alex Williamson , mst@redhat.com, qemu-devel@nongnu.org, David Gibson Il 01/07/2012 16:46, Alexey Kardashevskiy ha scritto: > On 01/07/12 23:40, Alexey Kardashevskiy wrote: >> On 01/07/12 23:32, Paolo Bonzini wrote: >>> Il 01/07/2012 13:06, Alexey Kardashevskiy ha scritto: >>>> Doing MSI init stuff, QEMU-VFIO calls the same event_notifier_init() >>>> (returns recycled fd=XX what is correct but confuses) and >>>> qemu_set_fd_handler() which adds a handler but select() does not pick >>>> it up. >>> >>> This sounds like a missing qemu_notify_event(). There was a recent >>> thread on a similar problem with block/iscsi.c. >> >> >> Oh, right, that helps too when place in qemu_set_fd_handler2(). > > > Like this. Right place? Yes, please resend as a toplevel message (i.e. not deep in a thread) with my Reviewed-by. Paolo > > > --- > iohandler.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/iohandler.c b/iohandler.c > index 3c74de6..dea4355 100644 > --- a/iohandler.c > +++ b/iohandler.c > @@ -77,6 +77,7 @@ int qemu_set_fd_handler2(int fd, > ioh->fd_write = fd_write; > ioh->opaque = opaque; > ioh->deleted = 0; > + qemu_notify_event(); > } > return 0; > } >