From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzPtq-0005Ez-Nv for qemu-devel@nongnu.org; Mon, 10 Nov 2008 01:05:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzPtq-0005En-54 for qemu-devel@nongnu.org; Mon, 10 Nov 2008 01:05:22 -0500 Received: from [199.232.76.173] (port=43017 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzPtp-0005Ek-T3 for qemu-devel@nongnu.org; Mon, 10 Nov 2008 01:05:21 -0500 Received: from ey-out-1920.google.com ([74.125.78.148]:4248) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzPtp-00009T-Ia for qemu-devel@nongnu.org; Mon, 10 Nov 2008 01:05:21 -0500 Received: by ey-out-1920.google.com with SMTP id 4so877555eyk.4 for ; Sun, 09 Nov 2008 22:05:19 -0800 (PST) Date: Mon, 10 Nov 2008 08:07:09 +0200 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH, v2] Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets Message-ID: <20081110060709.GB2423@localhost.localdomain> References: <1223892640-15545-11-git-send-email-kirill@shutemov.name> <1225129768-11603-1-git-send-email-kirill@shutemov.name> <20081101165110.GA6991@shareable.org> <20081101165543.GA5076@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 10, 2008 at 04:54:35AM +0100, andrzej zaborowski wrote: > Hi, >=20 > 2008/11/1 Kirill A. Shutemov : > > On Sat, Nov 01, 2008 at 04:51:10PM +0000, Jamie Lokier wrote: > >> Kirill A. Shutemov wrote: > >> > + /* Unmap and try again with new page */ > >> > + munmap(ptr, size); > >> > addr +=3D qemu_host_page_size; > >> > >> Won't this be rather slow if it has to skip a large mapped area, one > >> page at a time? > > > > If we skip more than one page we increase memory fragmentation. >=20 > This approach makes sense, however the iterating over all pages may > indeed have performance consequences, plus it would be great if people > who better know linux-user/ than me commented. I'll assume that > everyone is happy with this otherwise. Paul, can you comment it? > It may be useful adding a comment on top of the function that it must > be called with mmap_lock held. Ok, I'll do it. --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkXz40ACgkQbWYnhzC5v6pTuACePIV3EDaXO+kth24UPvnDIGxx Sq0An2Cg613ZNoooeUw65GC8qYPUfCfX =w4mT -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2--