From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQNt9-0006Fc-Sq for qemu-devel@nongnu.org; Fri, 23 Jan 2009 10:24:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQNt6-0006CT-UY for qemu-devel@nongnu.org; Fri, 23 Jan 2009 10:24:07 -0500 Received: from [199.232.76.173] (port=52578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQNt6-0006C9-MB for qemu-devel@nongnu.org; Fri, 23 Jan 2009 10:24:04 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:52250) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQNt6-00011Z-AZ for qemu-devel@nongnu.org; Fri, 23 Jan 2009 10:24:04 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e35.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0NFLEij002208 for ; Fri, 23 Jan 2009 08:21:14 -0700 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 n0NFO1aT206766 for ; Fri, 23 Jan 2009 08:24:01 -0700 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 n0NFO1Rb001210 for ; Fri, 23 Jan 2009 08:24:01 -0700 Date: Fri, 23 Jan 2009 09:23:59 -0600 From: Ryan Harper Message-ID: <20090123152359.GK13481@us.ibm.com> References: <1232720479-21398-1-git-send-email-ryanh@us.ibm.com> <1232720479-21398-3-git-send-email-ryanh@us.ibm.com> <4979DBA8.8080609@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4979DBA8.8080609@codemonkey.ws> Subject: [Qemu-devel] Re: [PATCH 2/2] lsi, scsi-disk: check for reentrance via tag matching Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Ryan Harper , qemu-devel@nongnu.org, kvm@vger.kernel.org * Anthony Liguori [2009-01-23 09:09]: > > By virtue of the fact that we do bdrv_aio_read() here, it *has* to be > safe to run the scsi_command_completes from a bottom half because > scsi_read_complete is going to get invoked from a bottom half anyway in > this path. > > Am I missing something? Just moving scsi_command_complete to a bottom half won't be sufficent since lsi_command_complete() is also re-entrent via calls to lsi_resume_script() which can invoke lsi_do_command(). The issue of bottom halves for lsi is something I've thought about, but haven't figured out how to only execute enough lsi scripts to complete the current command. Having the device stop executing scripts after sending back the command completion to the OS was my first though on how to prevent this loop, but so far, just stopping after just sending the completion back to the OS isn't something that the OS driver handles well. I suppose once we figure out how to stop executing scripts after sending command completion in a way that the OS drivers understand, moving that to a bottom half will work fine. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com