mpctl.2 (2010 09)

m
mpctl(2) mpctl(2)
MPC_GETFIRSTPROXIMATESPU
This request returns the ID of the first enabled processor which is in the proces-
sor set of the calling thread and is proximate to spu . Even when spu is enabled,
the return value will be -1 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.
MPC_GETNEXTPROXIMATESPU
This request returns the ID of the next enabled processor which is in the proces-
sor set of the calling thread and is proximate to spu. The pid argument is
ignored.
Typically,
MPC_GETFIRSTPROXIMATESPU
is called to determine the first prox-
imate spu.
MPC_GETNEXTPROXIMATESPU
is then called in a loop (until the
call returns -1) to determine the IDs of the remaining proximate spus.
Processor Set Information
Warning: Dynamic creation and deletion of processor sets, and dynamic reassignment of a processor from
one processor set to another may occur. All processors in the system comprise one processor set by
default at boot time until new processor sets are created and configured by users.
The following command requests return topology information on processors and locality domains in the
processor set of the calling thread. Only an enabled processor can be in a processor set. A locality
domain is said to be in a processor set, if it contributes at least one processor to that processor set.
For processor 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_GETNUMSPUS
This request returns the number of spus (processors) in the processor set of the
calling thread. The spu and pid arguments are ignored.
MPC_GETFIRSTSPU
This request returns the ID of the first processor in the processor set of the cal-
ling thread. The spu and pid arguments are ignored.
MPC_GETNEXTSPU
This request returns the ID of the next processor in the processor set of the cal-
ling thread after spu. The pid argument is ignored.
Typically,
MPC_GETFIRSTSPU
is called to determine the first spu.
MPC_GETNEXTSPU is then called in a loop (until the call returns -1) to deter-
mine the IDs of the remaining spus.
For locality domain topology use:
int mpctl(mpc_request_t request, ldom_t ldom, pid_t pid);
The request argument determines the precise action to be taken by mpctl() and is one of the following:
MPC_GETNUMLDOMS
This request returns the number of locality domains in the processor set of the
calling thread. The ldom and pid arguments are ignored.
MPC_GETFIRSTLDOM
This request returns the ID of the first locality domain in the processor set of the
calling thread. The ldom and pid arguments are ignored.
MPC_GETNEXTLDOM
This request returns the ID of the next locality domain in the processor set of the
calling thread after ldom. The pid argument is ignored.
Typically,
MPC_GETFIRSTLDOM is called to determine the first locality domain.
MPC_GETNEXTLDOM is then called in a loop (until the call returns -1) to deter-
mine the IDs of the remaining locality domains.
MPC_LDOMSPUS This request returns the number of processors contributed by the locality domain
ldom to the processor set of the calling thread. It may be less than the total
number of processors in the ldom . The pid argument is ignored.
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010