Kenwood HP 9000 Personal Computer User Manual


 
Chapter 8 273
Ways to Improve Performance
Options to Improve TLB Hit Rates
Options to Improve TLB Hit Rates
To improve Translation Lookaside Buffer (TLB) hit rates in an
application running on a PA 8000-based system, use the following linker
or chatr virtual memory page setting options:
+pd size — requests a specified data page size of 4K bytes, 16K, 64K,
256K, 1M, 4M, 16M, 64M, 256M, or L. Use L to specify the largest
page size available. The actual page size may vary if the requested
size can not be fulfilled.
+pi size — requests a specified instruction page size. (See +pd size for
size values.)
The default data and instruction page size is 4K bytes on PA-RISC
systems.
The PA-RISC 2.0 architecture supports multiple page sizes, from 4K
bytes to 64M bytes, in multiples of four. This enables large contiguous
regions to be mapped into a single TLB entry. For example, if a
contiguous 4MB of memory is actively used, 1000 TLB entries are
created if the page size is 4K bytes, but only 64 TLB entries are created if
the page size is 64K bytes.
Applications and benchmarks have larger and larger working-set sizes.
Therefore, the linker and chatr TLB page setting options can help boost
performance by improving TLB hit rates.
Some scientific applications benefit from large data pages. Alternatively,
some commercial applications benefit from large instruction page sizes.
Examples:
To set the virtual memory page size by using the linker:
ld +pd 64K +pi 16K /opt/langtools/lib/crt0.o myprog.o -lc
To set the page size from HP C and HP Fortran:
cc -Wl,+pd,64K,+pi,16K myprog.c
f90 -Wl,+pd,64K,+pi,16K myprog.f
To set the page size by using chatr:
chatr +pd 64K +pi 16K a.out