Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
Am 29.03.2012 11:31, schrieb Stefan Hajnoczi: > 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. > > v2: > * Keep aiocb and cancel request on reset [mjt] > > 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 | 137 +--- > hw/ide/internal.h |3 + > 2 files changed, 100 insertions(+), 40 deletions(-) I'm not really happy that we get another instance of iov/qiov/aiocb, but as long as it's purely internal, we can unify it with the DMA operations later. Thanks, applied both to the block branch. Kevin
Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
On Thu, Mar 29, 2012 at 5:31 PM, Stefan Hajnoczi wrote: > 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. > > v2: > * Keep aiocb and cancel request on reset [mjt] > > 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 | 137 +--- > hw/ide/internal.h | 3 + > 2 files changed, 100 insertions(+), 40 deletions(-) > > -- > 1.7.9.1 > > Reviewed-by: Zhi Yong Wu -- Regards, Zhi Yong Wu
Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
On Thu, Mar 29, 2012 at 5:31 PM, Stefan Hajnoczi wrote: > 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. > > v2: > * Keep aiocb and cancel request on reset [mjt] > > 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 | 137 +--- > hw/ide/internal.h | 3 + > 2 files changed, 100 insertions(+), 40 deletions(-) > > -- > 1.7.9.1 > > Zhi Yong Wu -- Regards, Zhi Yong Wu
Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
Il 29/03/2012 11:31, 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. > > v2: > * Keep aiocb and cancel request on reset [mjt] > > 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 | 137 +--- > hw/ide/internal.h |3 + > 2 files changed, 100 insertions(+), 40 deletions(-) > Reviewed-by: Paolo Bonzini
Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
Stefan Hajnoczi wrote: > > Chris and Richard: Please test this to confirm that it fixes the hang you > > reported. ... > Ping? We never explicitly said, but yes v2 does fix the hang for us, like v1 did. We are certainly +1 for this going into qemu 1.1. Thanks, Richard.
Re: [Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
On Thu, Mar 29, 2012 at 10:31 AM, Stefan Hajnoczi wrote: > 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. > > v2: > * Keep aiocb and cancel request on reset [mjt] > > 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 | 137 +--- > hw/ide/internal.h | 3 + > 2 files changed, 100 insertions(+), 40 deletions(-) Ping? Stefan
[Qemu-devel] [PATCH v2 0/2] ide: convert pio code path to asynchronous I/O
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. v2: * Keep aiocb and cancel request on reset [mjt] 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 | 137 +--- hw/ide/internal.h |3 + 2 files changed, 100 insertions(+), 40 deletions(-) -- 1.7.9.1