From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw0t9-0004at-O2 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw0t3-0004UD-Kd for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:06 -0400 Received: from [199.232.76.173] (port=54151 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw0t3-0004Tv-Ca for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:01 -0400 Received: from mail-qy0-f199.google.com ([209.85.221.199]:42339) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw0t3-0004pk-1K for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:01 -0400 Received: by qyk37 with SMTP id 37so697601qyk.18 for ; Thu, 08 Oct 2009 14:51:00 -0700 (PDT) Message-ID: <4ACE5EBF.50500@codemonkey.ws> Date: Thu, 08 Oct 2009 16:50:55 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Revert "posix-aio-compat: avoid signal race when spawning a thread" References: <20091007132006.GA9668@redhat.com> <4ACCC1A5.5020306@codemonkey.ws> <20091007204421.GC4085@redhat.com> <20091007205523.GA4783@redhat.com> <20091008014742.GA15601@shareable.org> <20091008151527.GB29691@shareable.org> <20091008212421.GA7229@redhat.com> In-Reply-To: <20091008212421.GA7229@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org Michael S. Tsirkin wrote: > BTW, tried looking at the code. > I saw some (unrelated) issues: > > static void aio_signal_handler(int signum) > { > if (posix_aio_state) { > char byte = 0; > > write(posix_aio_state->wfd, &byte, sizeof(byte)); > } > > qemu_service_io(); > } > > And qemu_service_io does a *ton* of things. > It just does a cpu_exit(). > Questions: > - Do we need the call to qemu_service_io? Seems to > behave the same with and without it. > Where you run into trouble is when you have a guest that has no periodic timer and needs a mechanism to break out of the tcg loop whenever an IO operation completes. See Author: aliguori Date: Wed Oct 8 19:50:24 2008 +0000 Fix IO performance regression in sparc > - Are all of the data structures touched by qemu_service_io > protected by blocking signals before access? > cpu_exit is pretty careful to not do anything that could be racey. > Also: > - let's use signalfd on linux, if available? > signalfd doesn't help. In fact, we originally used signalfd and it caused a regression. > - for SIGALARM, maybe timerfd? > Or just get rid of SIGALARM... Regards, Anthony Liguori