The short answer, AFAIK, is yes, these are the only page sizes you can
use. You cannot select arbitrary sizes and use them at will.
Here is some detail:
The page size support table in the kernel is hw_page_array[] and is
populated for the x86 by page_coloring_init() in i86pc/vm/vm_machdep.c
It appears the initialisation of this array is based upon L2 parameters
combined with the mmu capabilities, but you'll have to read the code for
yourself to see what it does - I'm afraid I can't claim to understand
the innards of x86 memory management :-)
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/vm/vm_machdep.c#1742
This defines the maximum possible number of page sizes which are
supported. On my system, this gives:
# echo "mmu::print level_size max_page_level umax_page_level" | mdb -k
level_size = [ 0x1000, 0x200000, 0x40000000, 0x8000000000 ]
max_page_level = 0x1
umax_page_level = 0x1
which correspond to 4K, 2M, 1G and 512G (from level_size).
Only some of these are made available to the kernel or userland to make
use of (governed by the max_page_level and umax_page_level members of
"mmu" respectively). On my system, the values are both 1, so I can only
use 4K (default) and 2M. "pagesize -a" confirms the userland limit
somewhat more easily than mdb :-)
# pagesize -a
4096
2097152
The list of sizes made available to userland is governed by
mmu_exported_page_sizes, which is set in mmu_init() from the value of
mmu.umax_page_level which in turn is set by set_max_page_level()
according to some capabilities checks and some tunables.
SPARC potentially supports more than this, and the supported sizes are
statically declared in hw_page_array[] in sun4u/vm/mach_vm_dep.c - the
sun4v equivalent is identical, and the list is 4k, 64k, 512k, 4M, 32M
and 256M.
Hope that helps,
Brian
Kishore Kumar Pusukuri wrote:
I would like to see the impact of different page sizes on the performance of multi-threaded applications. However, the pagesize -a command is producing only 3 possible page sizes including the default 4Kb on my AMD machine (shown below). Are these only page sizes I can use? (or) Is there anyway I can use more than these?
kish...@opensolaris:~$ pagesize -a
4096
2097152
1073741824
--
Brian Ruthven
Solaris Network RPE (Sustaining)
Oracle UK
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org