From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI3yz-0003fY-2r for qemu-devel@nongnu.org; Mon, 24 Feb 2014 17:26:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WI3yr-0002LZ-HF for qemu-devel@nongnu.org; Mon, 24 Feb 2014 17:26:41 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:44850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI3yr-0002LM-AE for qemu-devel@nongnu.org; Mon, 24 Feb 2014 17:26:33 -0500 Date: Mon, 24 Feb 2014 17:26:28 -0500 (EST) From: Paolo Bonzini Message-ID: <392369891.8578031.1393280788249.JavaMail.zimbra@redhat.com> In-Reply-To: <20140224151654.GB23185@stefanha-thinkpad.hitronhub.home> References: <52FDE495.4050004@ac.upc.edu> <52FDF6F0.4090405@redhat.com> <20140224151654.GB23185@stefanha-thinkpad.hitronhub.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt-users] Adjust disk image migration (NBD) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Libvirt Users , Michal Privoznik , Jeff Cody , qemu-devel , Joaquim Barrera > Thanks for raising this. > > I noticed that mirror_run() does not throttle the first loop where it > populates the dirty bitmap using bdrv_is_allocated_above(). This is on purpose. Does it causes a noticeable stall in the guest? > The main > copy loop does take the speed limit into account but perhaps that's > broken too. Yeah, it looks broken. Each iteration of the loop can write much more than sectors_per_chunk sectors, but here: if (s->common.speed) { delay_ns = ratelimit_calculate_delay(&s->limit, sectors_per_chunk); } else { delay_ns = 0; } the second argument is fixed. :/ Paolo