qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: fix initialization in bdrv_io_limits_ena


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block: fix initialization in bdrv_io_limits_enable()
Date: Tue, 15 Jan 2013 09:26:56 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 11, 2013 at 01:29:55PM +0100, Peter Lieven wrote:
> bdrv_io_limits_enable() starts a new slice, but does not set io_base
> correctly for that slice.
> 
> Here is how io_base is used:
> 
>    bytes_base  = bs->nr_bytes[is_write] - bs->io_base.bytes[is_write];
>    bytes_res   = (unsigned) nb_sectors * BDRV_SECTOR_SIZE;
> 
>    if (bytes_base + bytes_res <= bytes_limit) {
>        /* no wait */
>    } else {
>        /* operation needs to be throttled */
>    }
> 
> As a result, any I/O operations that are triggered between now and
> bs->slice_end are incorrectly limited.  If 10 MB of data has been
> written since the VM was started, QEMU thinks that 10 MB of data has
> been written in this slice. This leads to a I/O lockup in the guest.
> 
> We fix this by delaying the start of a new slice to the next
> call of bdrv_exceed_io_limits().
> 
> Signed-off-by: Peter Lieven <address@hidden>
> ---
>  block.c |    4 ----
>  1 file changed, 4 deletions(-)

I resolved a merge conflict due to whitespace issues with your patch.
Perhaps you copy-pasted from a terminal into an email client.  Please
try git-send-email(1) or double-check that spaces haven't changed before
sending.

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]