large pages (amd64)

Alan Cox alc at cs.rice.edu
Mon Jun 29 00:10:18 UTC 2009


Wojciech Puchar wrote:
>>
>>       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
>>
>>
>>
> how can i check how much (or maybe - what processes) 2MB pages are 
> actually allocated?

I'm afraid that you can't with great precision.  For a given program 
execution, on an otherwise idle machine, you can only estimate the 
number by looking at the change in the quantity "promotions + mappings - 
demotions" before, during, and after the program execution.

A program can call mincore(2) in order to determine if a virtual address 
is part of a 2 or 4MB virtual page.

Alan



More information about the freebsd-hackers mailing list