Received: from eggs.gnu.org ([2001:4830:134:3::10]:36540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhCQn-0007I6-Qh for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhCQj-00014G-KD for qemu-devel@nongnu.org; Thu, 23 Oct 2014 03:03:33 -0400 Date: Thu, 23 Oct 2014 09:03:25 +0200 From: Kevin Wolf Message-ID: <20141023070325.GA3522@noname.redhat.com> References: <201410211604116199416@sangfor.com> <5446265E.306@redhat.com> <54482D38.5080904@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <54482D38.5080904@redhat.com> Subject: Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-trivial , Zhang Haoyu , qemu-devel , Stefan Hajnoczi , Max Reitz --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 23.10.2014 um 00:18 hat Eric Blake geschrieben: > On 10/21/2014 03:24 AM, Max Reitz wrote: > > On 2014-10-21 at 10:04, Zhang Haoyu wrote: > >> Use local variable to bdrv_pwrite_sync L1 table, > >> needless to make conversion of cached L1 table between > >> big-endian and host style. > >> > >> Signed-off-by: Zhang Haoyu > >> --- > >> block/qcow2-refcount.c | 22 +++++++--------------- > >> 1 file changed, 7 insertions(+), 15 deletions(-) > >> >=20 > I know we're up to v5 and that Max already took it into his branch, but... >=20 >=20 > >> l1_size2 =3D l1_size * sizeof(uint64_t); > >> + l1_table =3D g_try_malloc0(align_offset(l1_size2, 512)); > >=20 > > I wanted to propose using qemu_try_blockalign(), but since it'd require > > a memset() afterwards, it gets rather ugly. >=20 > Not after this recent patch: >=20 > https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html We can switch to qemu_try_blockalign0() in a follow-up patch. But this is far from being a fast path, so there is very little to gain anyway. Kevin --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJUSKg8AAoJEH8JsnLIjy/WPgMP/0/EqgnHTY0zGEg9LmUBwjkj 0AqxzZQf/KDFY2w9acLntcnYLjf2CI4Hu8WZG0ebBYYo+tYQ6g2P0DeULJTj109k ZvFwOoNIlr+tHpL8YQDH7fqleL12P6Hj3lz+3Sc86saSOkJRVjeXdJ+lEIlOPUzi aYtd+uGsBWeyTjvWAe8Q6f9DJJaOdxpjJrmyjK0E8Izna7S4TvYN7clRwo5syMYX IIbU1akBI4mnQ1dXWTXcDye9y4z5a5GuT+SjIAH5wG2/5560vwDp91lWJxxfNGuH a8AXTS3jrhUS1QFcq28kcqvB9ICsTa3kv8TytW6KFJ7ZhG2lhVj1qOwCq78kRqIm 31zmC+1HBj+3SfvE4r/VOpRrleuFICwgKKx/OsnuSSSeZWEMV76/TQSPyahm2pXQ gwhQmKomOHjy12KC+nYMBYRgbiGbAInJKQe2iXUj9CyKxOSJxdHsddHPc5kmMMPO frDNRRcxtYjyyRqXHaNzdKf2sTu+EqC+uL/Gi/+TtXFbYPE/AManioQMKrQRyuD4 RTVKL2c39w/eERXWaT9yIa9e+gKjXDxd6odHk91hKF49YK0t8DXn9f9exSVez3dh 2JkPF+Fp8/jAg6fmaH5GxXqGeAB+KkMSg6q37OJoyF5XFATnr7XhFGpz2Sc6xvr/ 2ezHGPU+WoG4KeAJXO8D =Acxq -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--