From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvWG-0008PN-3W for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:14:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCvWA-00023w-Rk for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:14:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCvWA-00023P-KX for qemu-devel@nongnu.org; Wed, 28 Mar 2012 12:14:38 -0400 Message-ID: <4F7338D1.6060800@redhat.com> Date: Wed, 28 Mar 2012 18:14:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1332949439-6781-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1332949439-6781-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] ide: convert pio code path to asynchronous I/O List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Richard Davies , Chris Webb , qemu-devel@nongnu.org, Zhi Yong Wu Il 28/03/2012 17:43, Stefan Hajnoczi ha scritto: > IDE PIO mode is currently implemented using synchronous I/O functions. There's > no need to do this because the IDE interface is actually designed with polling > and interrupts in mind - we can do asynchronous I/O and let the guest know when > the operation has completed. The benefit of asynchronous I/O is that the guest > can continue executing code and is more responsive. > > The second aim of this conversion is to avoid calling bdrv_read()/bdrv_write() > since they do not work with I/O throttling. This means guests should now boot > IDE drives successfully when I/O throttling is enabled. > > Note that ATAPI is not converted yet and still uses bdrv_read() in two > locations. A future patch will have to convert ATAPI so CD-ROMs also do > asynchronous I/O. > > I have tested both Windows 7 Home Premium and Red Hat Enterprise Linux 6.0 > guests with these patches. In Windows, use the device manager to disable DMA > on the IDE channels. Under recent Linux kernels, use the libata.dma=0 kernel > parameter. > > Chris and Richard: Please test this to confirm that it fixes the hang you > reported. > > Stefan Hajnoczi (2): > ide: convert ide_sector_read() to asynchronous I/O > ide: convert ide_sector_write() to asynchronous I/O > > hw/ide/core.c | 129 ++++++++++++++++++++++++++++++++++++---------------- > hw/ide/internal.h | 2 + > 2 files changed, 91 insertions(+), 40 deletions(-) > Reviewed-by: Paolo Bonzini Paolo