From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBSz-0000VY-Ey for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:02:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDBSv-0007nI-6M for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:02:17 -0400 Date: Thu, 9 Jul 2015 14:02:08 +0100 From: Stefan Hajnoczi Message-ID: <20150709130208.GD11166@stefanha-thinkpad.redhat.com> References: <1436413678-7114-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hoZxPH4CaxYzWscb" Content-Disposition: inline In-Reply-To: <1436413678-7114-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [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 , qemu-devel@nongnu.org, qemu-block@nongnu.org --hoZxPH4CaxYzWscb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 09, 2015 at 11:47:55AM +0800, Fam Zheng wrote: > 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 th= at > guest responsiveness still suffers when we are busy in the initial dirty = bitmap > scanning loop of mirror job. That is because 1) we issue too many lseeks;= 2) we > only sleep for 0 ns which turns out quite ineffective in yielding BQL to = vcpu > threads. Both are fixed. >=20 > To reproduce: start a guest, attach a 10G raw image, then mirror it. Your > guest will immediately start to stutter (with patch [1] testing on a loca= l ext4 > 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 = uses > it in mirror job; and lets bdrv_is_allocated_above return a larger p_num = as > suggested by Paolo Bonzini (although it's done without changing the API). >=20 > [1]: http://patchwork.ozlabs.org/patch/471656/ "block/mirror: Sleep > periodically during bitmap scanning" >=20 > Fam Zheng (3): > blockjob: Introduce block_job_relax_cpu > mirror: Use block_job_relax_cpu during bitmap scanning > mirror: Speed up bitmap initial scanning >=20 > block/mirror.c | 17 +++++++---------- > include/block/blockjob.h | 16 ++++++++++++++++ > 2 files changed, 23 insertions(+), 10 deletions(-) This patch only converts the mirror block job to use the new relax function. The other block jobs (stream, backup, commit) are still using a 0 ns delay and are therefore broken. They should probably be converted in the same series. --hoZxPH4CaxYzWscb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVnnDQAAoJEJykq7OBq3PI9sYH/j3CmSV/o4rdhgmroBDJAy6b txe+uygeF+fHHGOf2eDQTJZGhw0OmALkCvz/AxfWS09IX+t51kaMcBQJWsn4aCon 9mdDBqhSzP2LoatXksTi9E9VRGRSVBSZw9Mvf1/oGNIxCDqdN1FSyg1RR6AySez0 HujyCGFNE7QqKRkMT3hUNe3CBuHAWsp3l2e74VSTXUhRc80bHK6zv9IvSjshgx+7 He4dTriSZ7cYVpL4vegr86w4Saa+33yycaaraNLOwF4ndGbEL+/5fixuaRRkTNcd sZfFNfwOqUCa9ue5sGlHO1vJ3/0WpCirgXAonSPc5cD4fGn1MXR9jj4f78nuvYs= =/63W -----END PGP SIGNATURE----- --hoZxPH4CaxYzWscb--