mpctl.2 (2010 09)

m
mpctl(2) mpctl(2)
(NOT the ldom assignment of the caller). The ldom and pid arguments are
ignored.
Warning: The information returned by this system call may be out-of-date arbi-
trarily soon after the call completes due to the scheduler context switching the
caller onto a different ldom.
MPC_LDOMSPUS_SYS
This request returns the number of enabled processors in the locality domain
ldom. The pid argument is ignored.
MPC_SPUTOLDOM This request returns the ID of the locality domain containing processor spu. The
pid argument is ignored.
Proximity Topology Information
All processors in a given locality domain have equal latency to the memory contained within that locality
domain. However, a processor may have different cache-to-cache access latency to different processors
within its locality domain. The processors with the same cache-to-cache access latency are said to be
proximate to one another and form a proximity set. A processor’s cache-to-cache access latency to a pro-
cessor within its proximity set is lower compared to a processor not in its proximity set even within the
same locality domain. By definition, a processor is said to be proximate to itself. The topology of the pro-
cessors in a proximity set is called as Proximity Topology.
Proximity Topology is highly dependent on the underlying architecture of the system. An example of a
proximity set and the architecture supporting it is a set of processors on the same Front Side Bus (FSB)
on systems that use FSBs. Depending on the architecture:
each processor by itself may be shown in its proximity set
a subset of processors belonging to a locality domain may be shown in one proximity set
all processors in a locality domain may be shown in one proximity set
Note that there may or may not be more than one proximity set in a given locality domain.
Some applications that require only a subset of processors in the system may see performance benefit by
running on processors in the same proximity set. This can be achieved by creating a processor set with
processors from the same proximity set and running the application in this processor set.
For proximity topology use:
int mpctl(mpc_request_t request, spu_t spu, pid_t pid);
The request argument determines the precise action to be taken by mpctl() and is one of the following:
MPC_GETNUMPROXIMATESPUS_SYS
This request returns the number of enabled spus (processors) in the system that
are in the same proximity set as that of spu .Ifspu is enabled, the value
returned will be greater than or equal to 1. Otherwise -1 is returned. The pid
argument is ignored.
MPC_GETFIRSTPROXIMATESPU_SYS
This request returns the ID of the first enabled processor in the system that is
proximate to spu .Ifspu is enabled, it will return a valid processor ID. Other-
wise -1 is returned. The pid argument is ignored.
MPC_GETNEXTPROXIMATESPU_SYS
This request returns the ID of the next enabled processor in the system that is
proximate to spu . The pid argument is ignored.
Typically,
MPC_GETFIRSTPROXIMATESPU_SYS is called to determine the first
proximate spu. MPC_GETNEXTPROXIMATESPU_SYS is then called in a loop
(until the call returns -1) to determine the IDs of the remaining proximate spus.
MPC_GETNUMPROXIMATESPUS
This request returns the number of enabled spus (processors) in the processor
set of the calling thread and that are in the same proximity set as that of spu .
Even when spu is enabled, the return value will be 0 if none of the proximate
processors contribute to the processor set of the calling thread. If spu is not
enabled, -1 is returned. The pid argument is ignored.
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3