qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: fix bdrv_exceed_iops_limits wait computa


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] block: fix bdrv_exceed_iops_limits wait computation
Date: Wed, 20 Mar 2013 16:12:03 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Mar 20, 2013 at 03:56:33PM +0100, Benoît Canet wrote:
> > But I don't understand why bs->slice_time is modified instead of keeping
> > it constant at 100 ms:
> >
> >     bs->slice_time = wait_time * BLOCK_IO_SLICE_TIME * 10;
> >     bs->slice_end += bs->slice_time - 3 * BLOCK_IO_SLICE_TIME;
> >     if (wait) {
> >         *wait = wait_time * BLOCK_IO_SLICE_TIME * 10;
> >     }
> 
> In bdrv_exceed_bps_limits there is an equivalent to this with a comment.
> 
> ---------
>   /* When the I/O rate at runtime exceeds the limits,
>      * bs->slice_end need to be extended in order that the current statistic
>      * info can be kept until the timer fire, so it is increased and tuned
>      * based on the result of experiment.
>      */
>     bs->slice_time = wait_time * BLOCK_IO_SLICE_TIME * 10;
>     bs->slice_end += bs->slice_time - 3 * BLOCK_IO_SLICE_TIME;
>     if (wait) {
>         *wait = wait_time * BLOCK_IO_SLICE_TIME * 10;
>     }
> ----------

The comment explains why slice_end needs to be extended, but not why
bs->slice_time should be changed (except that it was tuned as the result
of an experiment).

Zhi Yong: Do you remember a reason for modifying bs->slice_time?

Stefan



reply via email to

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