From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KY3dZ-0006jT-BA for qemu-devel@nongnu.org; Tue, 26 Aug 2008 14:51:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KY3dX-0006eK-1K for qemu-devel@nongnu.org; Tue, 26 Aug 2008 14:51:28 -0400 Received: from [199.232.76.173] (port=42599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY3dW-0006e4-Ty for qemu-devel@nongnu.org; Tue, 26 Aug 2008 14:51:26 -0400 Received: from ag-out-0708.google.com ([72.14.246.241]:45333) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KY3dW-0003Hv-G7 for qemu-devel@nongnu.org; Tue, 26 Aug 2008 14:51:26 -0400 Received: by ag-out-0708.google.com with SMTP id 31so5883315agc.5 for ; Tue, 26 Aug 2008 11:51:24 -0700 (PDT) Message-ID: <48B4507F.9040609@codemonkey.ws> Date: Tue, 26 Aug 2008 13:50:39 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals. References: <18611.56975.584280.471257@mariner.uk.xensource.com> <48B3F411.2020306@redhat.com> <18611.63711.631859.280983@mariner.uk.xensource.com> <48B4027C.1000008@codemonkey.ws> <18612.1900.73781.314743@mariner.uk.xensource.com> <48B41B7E.40708@codemonkey.ws> <18612.7267.832361.270651@mariner.uk.xensource.com> <48B41F55.1000909@codemonkey.ws> <18612.8502.305043.233934@mariner.uk.xensource.com> <48B422F2.1090900@codemonkey.ws> <20080826174729.GB25893@shareable.org> In-Reply-To: <20080826174729.GB25893@shareable.org> 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, Ian Jackson , Gerd Hoffmann Jamie Lokier wrote: > Leading to: why would (real) signals being used to collect AIO events > anyway, if you don't have signalfd()? If you've got a helper thread, > just call aio_suspend() in the helper thread. There is no helper thread when signalfd() is available. The helper thread thing is only for backwards compatibility or for unices that don't support signalfd. Plus, there are a lot of places that we use signals currently. > Then you can just > deliver the AIO completion result to the relevant data structure or > even move it off the waiting queue (pthread_mutex_lock is your > friend), then wake the main waiting thread with byte written to its > pipe. > It's the queuing with threads where things start getting complicated and error prone. Regards, Anthony Liguori > -- Jamie > > >