HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)

m
mpctl(2) mpctl(2)
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.
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 pro-
cessor 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 cal-
ling 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 calling
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 calling
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 determine
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 cal-
ling 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.
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 215