From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXyRa-0004C1-M6 for qemu-devel@nongnu.org; Tue, 26 Aug 2008 09:18:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXyRX-00049y-NO for qemu-devel@nongnu.org; Tue, 26 Aug 2008 09:18:45 -0400 Received: from [199.232.76.173] (port=40866 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXyRX-00049R-48 for qemu-devel@nongnu.org; Tue, 26 Aug 2008 09:18:43 -0400 Received: from an-out-0708.google.com ([209.85.132.249]:53845) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXyRX-0005ZA-5c for qemu-devel@nongnu.org; Tue, 26 Aug 2008 09:18:43 -0400 Received: by an-out-0708.google.com with SMTP id d18so349265and.130 for ; Tue, 26 Aug 2008 06:18:40 -0700 (PDT) Message-ID: <48B4027C.1000008@codemonkey.ws> Date: Tue, 26 Aug 2008 08:17:48 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals. References: <1219336054-15919-1-git-send-email-kraxel@redhat.com> <1219336054-15919-2-git-send-email-kraxel@redhat.com> <18611.56975.584280.471257@mariner.uk.xensource.com> <48B3F411.2020306@redhat.com> <18611.63711.631859.280983@mariner.uk.xensource.com> In-Reply-To: <18611.63711.631859.280983@mariner.uk.xensource.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Gerd Hoffmann Ian Jackson wrote: > Gerd Hoffmann writes ("Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals."): > >> What this would be useful for? The termination signals usualy one-shot >> anyway, so I don't see any advantage in doing the pipe-to-self trick. >> > > The point is that then they can interrupt select(). > The race I know of is that you may get an aio signal completion before select but after you've already qemu_aio_poll()'d. In practice, we only sleep for 10ms at a time in select() so the race is handled by that. If we wanted to increase the amount of time we slept, we would have to handle this race. In KVM, we sleep for 1s in select() and use signalfd() to receive the aio notifications. For older hosts, we emulate signalfd using a thread and the pipe-to-self trick. Regards, Anthony Liguori > Ian. > > >