From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKh2-0006AJ-62 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:12:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIKgu-0007Pu-6g for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:12:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKgt-0007Pm-TH for qemu-devel@nongnu.org; Wed, 20 Mar 2013 11:12:36 -0400 Date: Wed, 20 Mar 2013 16:12:03 +0100 From: Stefan Hajnoczi Message-ID: <20130320151203.GA3584@stefanha-thinkpad.muc.redhat.com> References: <1363770734-30970-1-git-send-email-benoit@irqsave.net> <1363770734-30970-2-git-send-email-benoit@irqsave.net> <20130320132924.GB14441@stefanha-thinkpad.muc.redhat.com> <20130320142842.GA2389@stefanha-thinkpad.muc.redhat.com> <20130320145633.GA1473@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130320145633.GA1473@irqsave.net> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] block: fix bdrv_exceed_iops_limits wait computation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, Stefan Hajnoczi , wuzhy@linux.vnet.ibm.com, qemu-devel@nongnu.org On Wed, Mar 20, 2013 at 03:56:33PM +0100, Beno=EEt Canet wrote: > > But I don't understand why bs->slice_time is modified instead of keep= ing > > it constant at 100 ms: > > > > bs->slice_time =3D wait_time * BLOCK_IO_SLICE_TIME * 10; > > bs->slice_end +=3D bs->slice_time - 3 * BLOCK_IO_SLICE_TIME; > > if (wait) { > > *wait =3D wait_time * BLOCK_IO_SLICE_TIME * 10; > > } >=20 > In bdrv_exceed_bps_limits there is an equivalent to this with a comment. >=20 > --------- > /* When the I/O rate at runtime exceeds the limits, > * bs->slice_end need to be extended in order that the current stat= istic > * info can be kept until the timer fire, so it is increased and tu= ned > * based on the result of experiment. > */ > bs->slice_time =3D wait_time * BLOCK_IO_SLICE_TIME * 10; > bs->slice_end +=3D bs->slice_time - 3 * BLOCK_IO_SLICE_TIME; > if (wait) { > *wait =3D 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