pstat_getlocality.2 (2010 09)

p
pstat_getlocality(2) pstat_getlocality(2)
NAME
pstat_getlocality(), pstat_getproclocality() - returns system-wide or per-process information of a ccNUMA
system
SYNOPSIS
#include <sys/pstat.h>
int pstat_getlocality(
struct pst_locality *buf, size_t elemsize,
size_t elemcount, int index
);
int pstat_getproclocality(
struct pst_proc_locality *buf, size_t elemsize,
size_t pid, int index
);
DESCRIPTION
pstat_getlocality()
and pstat_getproclocality()
are part of the general pstat() func-
tionality provided to obtain information about various system contexts.
These calls return information on different parts of a Cache Coherent Non-Uniform Memory Architecture
(ccNUMA) system.
pstat_getlocality()
returns system-wide information, while
pstat_getproclocality()
returns per-process information. A locality is one "building block" of a
ccNUMA system. If a machine has only one locality, it is considered to be an UMA (Uniform Memory
Architecture) machine. UMA is also a synonym for Symmetric Multiprocessor (SMP).
These locality building blocks are nearly identical to the concept of the locality domain (or LDOM)as
described in the mpctl (2) manual page. From that manual page:
A locality domain consists of a related collection of processors, memory, and peripheral resources
that comprise a fundamental building block of the system. All processors and peripheral devices in
a given locality domain have equal latency to the memory contained within that locality domain.
There is only one difference between a locality and an LDOM, and that is the concept of interleaved
memory. Interleaved memory is a hardware-constructed region of physical memory that is created from
the memory of several locality domains. This memory is striped together with a very fine granularity. As
an example, consider a system with four locality domains 0, 1, 2, and 3. Let’s say they all contribute the
same amount of memory to the interleave. The interleaved memory may look like this (assuming a 64-
byte striping):
Memory Address Comes From
-------------- ----------
0 - 63 (bytes) LDOM 0
64 - 127 LDOM 1
128 - 191 LDOM 2
192 - 255 LDOM 3
256 - 319 LDOM 0
etc, etc
Interleaved memory is a good place to put shared objects, the kernel, and objects that could be accessed
from any part of the system. There will be at most one interleaved locality. Some systems may not have
interleaved memory.
Given the four-LDOM example above, these
pstat() calls would return five localities - one for each
LDOM, and one for interleaved memory. The reason that mpctl (2) does not count interleaved memory as
an LDOM is because mpctl (2) is used for scheduling purposes, and interleaved memory contains no pro-
cessors.
Function Descriptions
pstat_getlocality()
Returns system-wide information specific to each locality.
There is one instance of this context for each locality on the system. For each locality requested,
data, up to a maximum of elemsize bytes, are returned in the
struct pst_locality pointed
to by buf. The elemcount parameter specifies the number of struct pst_locality that are
available at buf to be filled in. The index parameter specifies the starting index within the con-
text of localities.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (8 pages)