Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Oct 2011 12:05:39 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: mmap performance and memory use
Message-ID:  <j714dj$ggg$1@dough.gmane.org>
In-Reply-To: <CAJUyCcMKZ1E5LoJ0BFZju_OH_jjDeqgvBMf8WZ%2BwDvJRFsbH6Q@mail.gmail.com>
References:  <alpine.BSF.2.00.1110061637270.15552@wojtek.tensor.gdynia.pl> <20111006160159.GQ1511@deviant.kiev.zoral.com.ua> <CAJUyCcMKZ1E5LoJ0BFZju_OH_jjDeqgvBMf8WZ%2BwDvJRFsbH6Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig275D6CCC01AF46E6D4CD92E6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 07/10/2011 19:13, Alan Cox wrote:
> On Thu, Oct 6, 2011 at 11:01 AM, Kostik Belousov <kostikbel@gmail.com>w=
rote:

>> For one thing, this indeed causes more memory use for the OS. This is
>> somewhat mitigated by automatic use of superpages. Superpage promotion=

>> still keeps the 4KB page table around, so most savings from the
>> superpages are due to more efficient use of TLB.
>>
>>
> You are correct about the page table page.  However, a superpage mappin=
g
> consumes a single PV entry, in place of 512 or 1024 PV entries.  This w=
inds
> up saving about three physical pages worth of memory for every superpag=
e
> mapping.

But wouldn't the "conservative" superpages policy make it difficult in
the OPs case to ever get promotions to superpages if he's touching pages
almost randomly?

> Similarly, mmap(..., MAP_PREFAULT_READ) on a large, memory resident fil=
e may pre-map the file using superpage mappings.=20

grep doesn't find this symbol in the sys src tree in 8-STABLE - nor it
seems in /usr/include.

But anyway, is there a mechanism which gives more guarantees than "may"
(i.e. which forces this) - or if not, how hard would it be to add one?
Some Linux-based "enterprise" software (including Java) use
Linux-specific calls to allocate large pages directly.



--------------enig275D6CCC01AF46E6D4CD92E6
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.18 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6UFPMACgkQldnAQVacBcjZYgCguCpgO/ThrKRZW83MIhhncDps
jkkAn0jcCgePAs5SOlPjJJjvmYkhm9FC
=Nxox
-----END PGP SIGNATURE-----

--------------enig275D6CCC01AF46E6D4CD92E6--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?j714dj$ggg$1>