From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0YHh-0003w7-M7 for qemu-devel@nongnu.org; Thu, 13 Nov 2008 04:14:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0YHf-0003us-7Z for qemu-devel@nongnu.org; Thu, 13 Nov 2008 04:14:41 -0500 Received: from [199.232.76.173] (port=37893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0YHf-0003uY-2M for qemu-devel@nongnu.org; Thu, 13 Nov 2008 04:14:39 -0500 Received: from mx2.redhat.com ([66.187.237.31]:44174) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0YHe-0001he-TR for qemu-devel@nongnu.org; Thu, 13 Nov 2008 04:14:39 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mAD9EZ6C022915 for ; Thu, 13 Nov 2008 04:14:35 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mAD9EXek032254 for ; Thu, 13 Nov 2008 04:14:34 -0500 Received: from zweiblum.travel.kraxel.org (vpn-4-130.str.redhat.com [10.32.4.130]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mAD9EWjq017694 for ; Thu, 13 Nov 2008 04:14:33 -0500 Message-ID: <491BEFF7.4070607@redhat.com> Date: Thu, 13 Nov 2008 10:14:31 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [patch] Fix block I/O hang. References: <4919B46C.3040804@redhat.com> <4919B79A.5030402@codemonkey.ws> <491AD436.40908@redhat.com> <491AEEE9.5010900@codemonkey.ws> In-Reply-To: <491AEEE9.5010900@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 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 Anthony Liguori wrote: > Gerd Hoffmann wrote: >> >>> Under what circumstances? posix_aio_read() is only invoked from a >>> select callback. This means there should be data available to be read. >>> >> >> Well, there are *two* select loops: main_loop_wait() and >> qemu_aio_wait(). Calling sync block i/o functions from a i/o handler >> causes the two select loops run nested => boom. > > Yeah, qemu_aio_wait needs to die. Can you resubmit your patch with a > better description, and change the read() look in posix_aio_read() to > consume as much data as possible before hitting EAGAIN? I've fixed my problem by changing xen_disk to use a bottom half for actual work, so the block read/write calls are moved out of the select loop anyway. Which turned out to be useful for aio support too. So I'm fine again with the current state. I can create such a patch nevertheless though. cheers, Gerd