Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2009 16:51:17 -0500
From:      Alan Cox <alan.l.cox@gmail.com>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: large pages (amd64)
Message-ID:  <ca3526250906281451g4441441bt3718d37dd848590a@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.0906281933580.1809@wojtek.tensor.gdynia.pl>
References:  <alpine.BSF.2.00.0906281933580.1809@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 28, 2009 at 12:36 PM, Wojciech Puchar <
wojtek@wojtek.tensor.gdynia.pl> wrote:

> i enabled
> vm.pmap.pg_ps_enabled: 1
>
>
> could you please explain what exactly this values means?
> because i don't understand why promotions-demotions!=mappings
>

"mappings" is not what you seem to think it is.  vm.pmap.pde.mappings is the
number of 2/4MB page mappings that are created directly and not through the
incremental promotion process.  For example, it counts the 2/4MB page
mappings that are created when the text segment of a large executable, e.g.,
gcc, is pre-faulted at startup or when a graphics card's frame buffer is
mmap()ed.

Moreover, not every promoted mapping is demoted.  A promoted mapping may be
destroyed without demotion, for example, when a process exits.  This is, in
fact, the ideal case because it is cheaper to destroy a single 2/4MB page
mapping instead of 512 or 1024 4KB page mappings.


>
> vm.pmap.pde.promotions: 2703
> vm.pmap.pde.p_failures: 6290
> vm.pmap.pde.mappings: 610
> vm.pmap.pde.demotions: 289
>
>
>
>
> other question - tried enabling it on my i386 laptop (256 megs ram), always
> mappings==0, while promitions>demotions>0.
>

The default starting address for executables on i386 is not aligned to a
2/4MB page boundary.  Hence, "mappings" are much less likely to occur.


> certainly there are apps that could be put on big pages, gimp editing 40MB
> bitmap for example


Regards,
Alan

<http://lists.freebsd.org/mailman/listinfo/freebsd-hackers><freebsd-hackers-unsubscribe@freebsd.org>;



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