Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2013 13:00:23 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        Benjamin Kaduk <kaduk@MIT.EDU>
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, Sebastian Feld <sebastian.n.feld@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: Multiple page size support on FreeBSD?
Message-ID:  <5165C4D7.3050308@mu.org>
In-Reply-To: <alpine.GSO.1.10.1304101438500.9389@multics.mit.edu>
References:  <CAHnbEGJuo9Jvskxaog0xLVM_LOse695b4E3fKae7YufOAVZuBg@mail.gmail.com> <alpine.GSO.1.10.1304072319300.9389@multics.mit.edu> <alpine.BSF.2.00.1304081238580.6013@wojtek.tensor.gdynia.pl> <201304101006.13960.jhb@freebsd.org> <alpine.BSF.2.00.1304101947470.19441@wojtek.tensor.gdynia.pl> <alpine.GSO.1.10.1304101438500.9389@multics.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/10/13 11:42 AM, Benjamin Kaduk wrote:
> On Wed, 10 Apr 2013, Wojciech Puchar wrote:
>
>>> How do your tests work?  Do you examine PTEs directly to check for 
>>> superpages
>>> or are you relying on the vm.pmap.pde sysctls?
>>
>> the later.
>>
>> anyway - algorithm described on list - that heuristics detects 
>> consecutive page access doesn't really help the urgent case - RANDOM 
>> access to large amount of memory.
>
> The algorithm is not a heuristic based on consecutive accesses, 
> promotion occurs when the entire superpage's worth of memory has 
> actually been accessed.  If I remember correctly, the performance gain 
> from superpages was only a few percent, so spending more time trying 
> to decide when to use them would make the algorithm a net wash.
>
> You should really watch the talk I linked to if you're interested, it 
> was quite interesting.
>
>> sequential access will get minimal improvement.
>>
>> IMHO the only way that really make sens is to add options to madvise 
>> to give kernel information about usage.
>
> Maybe.

It is cool that FreeBSD got this work via Alan Cox and the others that 
contributed.

I am wondering if it makes sense to have an explicit model.

At one place, for a platform with high performance but a very small TLB, 
we made it possible to explicitly request a large TLB for our process 
and it made a BIG difference for performance.

Sometimes being "general purpose" means that you can expose such low 
level things for the user to tune instead of requiring them to fit the 
app to a heuristic that may change.

-Alfred


>
> -Ben Kaduk
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to 
> "freebsd-hackers-unsubscribe@freebsd.org"
>




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