From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kie11-0007Tl-MH for qemu-devel@nongnu.org; Wed, 24 Sep 2008 19:43:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kie0z-0007SF-Pr for qemu-devel@nongnu.org; Wed, 24 Sep 2008 19:43:27 -0400 Received: from [199.232.76.173] (port=34261 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kie0z-0007Rx-Ha for qemu-devel@nongnu.org; Wed, 24 Sep 2008 19:43:25 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:50135) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kie0z-0002nW-1V for qemu-devel@nongnu.org; Wed, 24 Sep 2008 19:43:25 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e35.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m8ONdLSj017526 for ; Wed, 24 Sep 2008 19:39:21 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m8ONdL47206638 for ; Wed, 24 Sep 2008 17:39:21 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m8P5dLdc009618 for ; Wed, 24 Sep 2008 23:39:21 -0600 Message-ID: <48DACF6F.40301@us.ibm.com> Date: Wed, 24 Sep 2008 18:38:23 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20080924225946.GA28588@dmt.cnet> In-Reply-To: <20080924225946.GA28588@dmt.cnet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: qemu-devel@nongnu.org Marcelo Tosatti wrote: > From: Matteo Frigo > Date: Wed, 02 Apr 2008 20:41:24 -0400 > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] QEMU/KVM SCSI lock up > X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) > X-Mailman-Approved-At: Thu, 03 Apr 2008 00:59:59 -0400 > Reply-To: qemu-devel@nongnu.org > > kvm-64 hangs under heavy disk I/O with scsi disks. To reproduce, > create a fresh qcow2 disk, boot linux, and execute > > dd if=/dev/sdX of=/dev/null bs=1M > > on the fresh disk. See also https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1895893&group_id=180599 > > I have attached a patch that appears to fix the problem. The bug > seems to be the following. scsi_read_data() does the following > > bdrv_aio_read() > r->sector += n; > r->sector_count -= n; > > For reasons that I do not fully understand, bdrv_aio_read() does > not return immediately, but instead it calls scsi_read_data() > recursively. This bothers me. bdrv_aio_read() should never immediately invoke the callback to prevent exactly this sort of problem. Perhaps this was a bug that has since been fixed? Is this still reproducible? Regards, Anthony Liguori