From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVG94-0002wD-LR for qemu-devel@nongnu.org; Mon, 05 Nov 2012 01:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVG93-0008Cs-Av for qemu-devel@nongnu.org; Mon, 05 Nov 2012 01:26:50 -0500 Received: from mout.web.de ([212.227.15.3]:52165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVG93-0008Cj-0L for qemu-devel@nongnu.org; Mon, 05 Nov 2012 01:26:49 -0500 Message-ID: <50975C27.5010906@web.de> Date: Mon, 05 Nov 2012 07:26:47 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <509627A2.3040509@web.de> <5096C044.7060504@redhat.com> In-Reply-To: <5096C044.7060504@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2C704766F791F7AAC7824EE1" Subject: Re: [Qemu-devel] [PATCH] memory: Reintroduce dirty flag to optimize changes on disabled regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2C704766F791F7AAC7824EE1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-11-04 20:21, Avi Kivity wrote: > On 11/04/2012 10:30 AM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Cirrus is triggering this, e.g. during Win2k boot: Changes only on >> disabled regions require no topology update when transaction depth dro= ps >> to 0 again. >=20 > 817dcc5368988b0 (pci: give each device its own address space) mad this > much worse by multiplying the number of address spaces. Each change is= > now evaluated N+2 times, where N is the number of PCI devices. It also= > causes a corresponding expansion in memory usage. I know... But this regression predates your changes, is already visible right after 02e2b95fb4. >=20 > I want to address this by caching AddressSpaceDispatch trees with the > key being the contents of the FlatView for that address space. This > will drop the number of distinct trees to 2-4 (3 if some devices have > PCI_COMMAND_MASTER disabled, 4 if the PCI address space is different > from the cpu memory address space) but will fail if we make each addres= s > space different (for example filtering out the device's own BARs). >=20 > If this change also improves cpu usage sufficiently, then it will be > better than your patch, which doesn't recognize changes in an enabled > region inside a disabled or hidden region. True, though the question is how common such scenarios are. This one (cirrus with win2k) is already special. > In other words, your patch > fits the problem at hand but isn't general. On the other hand my > approach doesn't eliminate render_memory_region(), just the exec.c stuf= f > and listener updates. So we need to understand where the slowness come= s > from. I would just like to have some even intermediate solution for 1.3. We can still make it more perfect later on if required. Jan --------------enig2C704766F791F7AAC7824EE1 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://www.enigmail.net/ iEYEARECAAYFAlCXXCcACgkQitSsb3rl5xTEowCffLYL3TSxFbxjScqKY08lN4JN lewAoILQ6sM6N3BbvROe80Z0lWEh5y0C =9mS7 -----END PGP SIGNATURE----- --------------enig2C704766F791F7AAC7824EE1--