[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs |
Date: |
Wed, 24 Jun 2009 20:31:26 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
Avi Kivity schrieb:
> Commit 6a7ad299 ("Call qemu_bh_delete at bdrv_aio_bh_cb") deletes emulated
> aio bottom halves to prevent endless accumulation. However, it leaves a
> stale ->bh pointer, which is then waited on when the aio is reused.
>
> Zeroing the pointer fixes the issue, allowing vmdk format images to be
> used.
>
> Signed-off-by: Avi Kivity <address@hidden>
> ---
> block.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/block.c b/block.c
> index aca5a6d..cefbe77 100644
> --- a/block.c
> +++ b/block.c
> @@ -1374,6 +1374,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB
> *blockacb)
> {
> BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb;
> qemu_bh_delete(acb->bh);
> + acb->bh = NULL;
> qemu_aio_release(acb);
> }
>
> @@ -1391,6 +1392,7 @@ static void bdrv_aio_bh_cb(void *opaque)
> qemu_vfree(acb->bounce);
> acb->common.cb(acb->common.opaque, acb->ret);
> qemu_bh_delete(acb->bh);
> + acb->bh = NULL;
> qemu_aio_release(acb);
> }
>
Thanks, your patch fixes the dma issues in linux guests when
booting with a block device without aio support (vmdk, vvfat,
vpc, nbd, ...):
without patch (many DMA errors in the guest, long boot time):
[ 5.374675] hda: QEMU HARDDISK, ATA DISK drive
[ 6.044267] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO2
[ 6.045096] hda: MWDMA2 mode selected
[ 7.555726] hda: max request size: 512KiB
[ 7.556193] hda: 65536 sectors (33 MB) w/256KiB Cache, CHS=65/255/63
[ 7.569253] hda: cache flushes supported
[ 7.569909] hda:<6>ide-cd driver 5.00
[ 27.568145] hda: dma_timer_expiry: DMA status (0x21)
[ 37.568221] hda: DMA timeout error
[ 37.568838] hda: dma timeout error: status=0xd8 { Busy }
[ 37.572195] hda: DMA disabled
[ 57.624211] hda: dma_timer_expiry: DMA status (0x21)
[ 67.624221] hda: DMA timeout error
[ 67.624842] hda: dma timeout error: status=0xd8 { Busy }
[ 67.628192] hda: DMA disabled
[ 87.872210] hda: dma_timer_expiry: DMA status (0x21)
[ 97.872209] hda: DMA timeout error
[ 97.872826] hda: dma timeout error: status=0xd8 { Busy }
[ 97.876184] hda: DMA disabled
[ 117.928209] hda: dma_timer_expiry: DMA status (0x21)
[ 127.928149] hda: DMA timeout error
[ 127.928815] hda: dma timeout error: status=0xd8 { Busy }
[ 127.932120] hda: DMA disabled
with patch (no DMA errors in the guest, fast boot):
[ 5.313278] hda: QEMU HARDDISK, ATA DISK drive
[ 5.984435] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO2
[ 5.985305] hda: MWDMA2 mode selected
[ 7.447866] hda: max request size: 512KiB
[ 7.448103] hda: 65536 sectors (33 MB) w/256KiB Cache, CHS=65/255/63
[ 7.461297] hda: cache flushes supported
[ 7.461948] hda: unknown partition table
I hope your patch will be applied to QEMU master soon.
Regards
Stefan
Acked-by: Stefan Weil <address@hidden>
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, (continued)
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Filip Navara, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Christoph Hellwig, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Avi Kivity, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Filip Navara, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Avi Kivity, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Christoph Hellwig, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Avi Kivity, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Christoph Hellwig, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Avi Kivity, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs, Filip Navara, 2009/06/23
- Re: [Qemu-devel] [PATCH] block: Clean up after deleting BHs,
Stefan Weil <=