From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDAMr-0003Qo-Oc for qemu-devel@nongnu.org; Thu, 09 Jul 2015 07:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDAMq-0007fQ-PX for qemu-devel@nongnu.org; Thu, 09 Jul 2015 07:51:53 -0400 Date: Thu, 9 Jul 2015 13:51:43 +0200 (CEST) From: Alexandre DERUMIER Message-ID: <351462454.9032314.1436442703808.JavaMail.zimbra@oxygem.tv> In-Reply-To: <1436413678-7114-1-git-send-email-famz@redhat.com> References: <1436413678-7114-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Jeff Cody , qemu-devel , qemu-block@nongnu.org Hi,=20 I have tested them, they works fine here (tested with source :raw on nfs, r= aw on ext3, and ceph/rbd device). Patch 3 give me a big boost with an empty 10GB source raw on ext3. (take so= me seconds vs some minutes) ----- Mail original ----- De: "Fam Zheng" =C3=80: "qemu-devel" Cc: "Kevin Wolf" , "Jeff Cody" , qemu-b= lock@nongnu.org Envoy=C3=A9: Jeudi 9 Juillet 2015 05:47:55 Objet: [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during=09b= itmap scan This supersedes:=20 http://patchwork.ozlabs.org/patch/491415/=20 and [1] which is currently in Jeff's tree.=20 Although [1] fixed the QMP responsiveness, Alexandre DERUMIER reported that= =20 guest responsiveness still suffers when we are busy in the initial dirty bi= tmap=20 scanning loop of mirror job. That is because 1) we issue too many lseeks; 2= ) we=20 only sleep for 0 ns which turns out quite ineffective in yielding BQL to vc= pu=20 threads. Both are fixed.=20 To reproduce: start a guest, attach a 10G raw image, then mirror it. Your= =20 guest will immediately start to stutter (with patch [1] testing on a local = ext4=20 raw image, and "while echo -n .; do sleep 0.05; done" in guest console).=20 This series adds block_job_relax_cpu as suggested by Stefan Hajnoczi and us= es=20 it in mirror job; and lets bdrv_is_allocated_above return a larger p_num as= =20 suggested by Paolo Bonzini (although it's done without changing the API).= =20 [1]: http://patchwork.ozlabs.org/patch/471656/ "block/mirror: Sleep=20 periodically during bitmap scanning"=20 Fam Zheng (3):=20 blockjob: Introduce block_job_relax_cpu=20 mirror: Use block_job_relax_cpu during bitmap scanning=20 mirror: Speed up bitmap initial scanning=20 block/mirror.c | 17 +++++++----------=20 include/block/blockjob.h | 16 ++++++++++++++++=20 2 files changed, 23 insertions(+), 10 deletions(-)=20 --=20 2.4.3=20