From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnycg-0007lC-OG for qemu-devel@nongnu.org; Mon, 01 Aug 2011 15:57:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qnycf-0005u8-6S for qemu-devel@nongnu.org; Mon, 01 Aug 2011 15:57:58 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:40133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnyce-0005tS-Rt for qemu-devel@nongnu.org; Mon, 01 Aug 2011 15:57:57 -0400 Message-ID: <4E37052E.70707@web.de> Date: Mon, 01 Aug 2011 21:57:34 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1312226782-26882-1-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1312226782-26882-1-git-send-email-anthony.perard@citrix.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig609DD833ADEAB1A93586E021" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] xen: Avoid useless allocation in Xen case. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Xen Devel , QEMU-devel , Stefano Stabellini , Alexander Graf This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig609DD833ADEAB1A93586E021 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-08-01 21:26, Anthony PERARD wrote: > The code_gen_buffer is not use by Xen and can be really big (several > GB). Even if the host RAM is not used, this buffer just burn the addres= s > space of the QEMU process. >=20 > So to "avoid" this allocation, the asked tb_size is set to the minimum.= >=20 > The other way to do that would be to not call code_gen_alloc when Xen i= s > enabled. >=20 > Signed-off-by: Anthony PERARD > --- > vl.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) >=20 > diff --git a/vl.c b/vl.c > index d8c7c01..bd60a89 100644 > --- a/vl.c > +++ b/vl.c > @@ -3106,6 +3106,14 @@ int main(int argc, char **argv, char **envp) > } > } > =20 > + if (xen_enabled()) { > + /* Allocate only the minimum amount of memory for the code_gen= _buffer. > + * Xen does not use it and we need the virtual address space f= or the > + * MapCache. > + */ > + tb_size =3D 1; > + } > + The same applies to kvm, please generalize. Jan --------------enig609DD833ADEAB1A93586E021 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk43BTIACgkQitSsb3rl5xRx6ACgzKYd+bh1diqHdJggtB3vOwOv tDAAn0DnueTOy2bWLl7MpSakeK42C2yu =dk1V -----END PGP SIGNATURE----- --------------enig609DD833ADEAB1A93586E021--