IBM Power7 Optimization And Tuning Manual page 44

Table of Contents

Advertisement

Application support to use multisize pages on AIX
As described in Power Instruction Set Architecture Version 2.06,
to use for four regions of a 32-bit or 64-bit process address space.
These page sizes can be configured with an environment variable or with settings in an
application XCOFF binary with the ldedit or ld commands, as shown in Table 2-5.
Table 2-5 Page sizes for four regions of a 32-bit or 64-bit process address space
Region
Data
Stack
Text
Shared memory
You can specify a different page size to use for each of the four regions of a process address
space. Only the 4 KB and 64 KB page sizes are supported for all four memory regions. The
16 MB page size is supported only for the process data, process text, and process shared
memory regions. The 16 GB page size is supported only for a process shared
memory region.
You can set the preferred page sizes for an application in the XCOFF/XCOFF64 binary file by
running the ldedit or ld commands.
The ld or cc commands can be used to set these page size options when you are linking
an executable command:
ld -o mpsize.out -btextpsize:4K -bstackpsize:64K sub1.o sub2.o
cc -o mpsize.out -btextpsize:4K -bstackpsize:64K sub1.o sub2.o
The ldedit command can be used to set these page size options in an existing
executable command:
ldedit -btextpsize=4K -bdatapsize=64K -bstackpsize=64K mpsize.out
We can set the preferred page sizes of a process with the LDR_CNTRL environment variable. As
an example, the following command causes the mpsize.out process to use 4 KB pages for its
data, 64 KB pages for its text, 64 KB pages for its stack, and 64 KB pages for its shared
memory on supported hardware:
LDR_CNTRL=DATAPSIZE=4K@TEXTPSIZE=64K@SHMPSIZE=64K mpsize.out
Page size environment variables override any page size settings in an executable XCOFF
header. Also, the DATAPSIZE environment variable overrides any LARGE_PAGE_DATA
environment variable setting.
Rather than using the LDR_CNTRL environment variable, consider marking specific executable
files to use large pages, because this limits the large page usage to the specific application
that benefits from large page usage.
9
Ibid
10
Power ISA Version 2.06 Revision B, available at:
http://power.org/wp-content/uploads/2012/07/PowerISA_V2.06B_V2_PUBLIC.pdf
28
POWER7 and POWER7+ Optimization and Tuning Guide
ld or ldedit
LDR_CNTRL
option
environment variable
bdatapsize
DATAPSIZE
bstackpsize
STACKPSIZE
btextpsize
TEXTPSIZE
None
SHMPSIZE
9
10
you can specify page sizes
Description
Initialized data, bss, and
heap
Initial thread stack
Main executable text
Shared memory that is
allocated by the process

Advertisement

Table of Contents
loading

This manual is also suitable for:

Power7+

Table of Contents