From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKQd-0007q6-K0 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 10:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIKQU-0000sn-CT for qemu-devel@nongnu.org; Wed, 20 Mar 2013 10:55:47 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:33591 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKQU-0000s3-20 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 10:55:38 -0400 Date: Wed, 20 Mar 2013 15:56:33 +0100 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20130320145633.GA1473@irqsave.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130320142842.GA2389@stefanha-thinkpad.muc.redhat.com> 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: Stefan Hajnoczi Cc: kwolf@redhat.com, wuzhy@linux.vnet.ibm.com, qemu-devel@nongnu.org, Stefan Hajnoczi > But I don't understand why bs->slice_time is modified instead of keepin= g > 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; > } 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 statis= tic * info can be kept until the timer fire, so it is increased and tune= d * 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; } ---------- Yes I will try your patch. Regards Beno=EEt