From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuNyF-0004Mj-S7 for qemu-devel@nongnu.org; Mon, 18 May 2015 12:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuNyB-0003Qc-O3 for qemu-devel@nongnu.org; Mon, 18 May 2015 12:32:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuNyB-0003QY-Iu for qemu-devel@nongnu.org; Mon, 18 May 2015 12:32:47 -0400 Date: Mon, 18 May 2015 17:32:43 +0100 From: Stefan Hajnoczi Message-ID: <20150518163243.GI27654@stefanha-thinkpad.redhat.com> References: <1430207220-24458-1-git-send-email-den@openvz.org> <1430207220-24458-26-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9iyR+p8Z2cn535Lj" Content-Disposition: inline In-Reply-To: <1430207220-24458-26-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 25/27] block/parallels: add prealloc-mode and prealloc-size open paramemets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Kevin Wolf , qemu-devel@nongnu.org, Roman Kagan --9iyR+p8Z2cn535Lj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 28, 2015 at 10:46:58AM +0300, Denis V. Lunev wrote: > This is preparational commit for tweaks in Parallels image expansion. > The idea is that enlarge via truncate by one data block is slow. It > would be much better to use fallocate via bdrv_write_zeroes and > expand by some significant amount at once. >=20 > Original idea with sequential file writing to the end of the file without > fallocate/truncate would be slower than this approach if the image is > expanded with several operations: > - each image expanding means file metadata update, i.e. filesystem > journal write. Truncate/write to newly truncated space update file > metadata twice thus truncate removal helps. With fallocate call > inside bdrv_write_zeroes file metadata is updated only once and > this should happen infrequently thus this approach is the best one > for the image expansion > - tail writes are ordered, i.e. the guest IO queue could not be sent > immediately to the host introducing additional IO delays >=20 > This patch just adds proper parameters into BDRVParallelsState and > performs options parsing in parallels_open. >=20 > Signed-off-by: Denis V. Lunev > CC: Roman Kagan > CC: Kevin Wolf > CC: Stefan Hajnoczi > --- > block/parallels.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++= ++---- > 1 file changed, 77 insertions(+), 6 deletions(-) Reviewed-by: Stefan Hajnoczi --9iyR+p8Z2cn535Lj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVWhQrAAoJEJykq7OBq3PIvEYIAJMgFdkgh2ZPJx+K3KoMhT4N QRfgkfqfpQCmXltaIPMNeOlXVHRph8CYHQ4lQxl70pCDAXDuntBhqDs9yvzSvXCF r0tzPRdBuPARtqeDg6ttC1miY4qAVJ0tGRkWmPR0uXMG5gotz30+JG+ik3ovC6TN ntJ/w5YdGubd0FGjFr/ow4ABAbTP1IYdiDkmG0txy06BtzfauapBd7RWClSgjmOt +P+O42HoZAWUJKq9ApQHV7SPogeFoD8CmWpIEgr6ZyUJ0/X2/f30VYTTMAOvmZhY f2Q+iJ/5snVGa/JWqNQADtANtgxGZPvevGPcowqufaWO9NQBnOLJIBfOXPE1Ws4= =vetA -----END PGP SIGNATURE----- --9iyR+p8Z2cn535Lj--