From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw0tC-0004dr-35 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw0t7-0004Ys-Qc for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:09 -0400 Received: from [199.232.76.173] (port=54152 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw0t7-0004YZ-FZ for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:05 -0400 Received: from qw-out-1920.google.com ([74.125.92.144]:54501) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw0t7-0004qA-5N for qemu-devel@nongnu.org; Thu, 08 Oct 2009 17:51:05 -0400 Received: by qw-out-1920.google.com with SMTP id 5so2069775qwc.4 for ; Thu, 08 Oct 2009 14:51:04 -0700 (PDT) Message-ID: <4ACE5EC6.3000805@codemonkey.ws> Date: Thu, 08 Oct 2009 16:51:02 -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