HP-UX Reference (11i v2 03/08) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
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 comprises 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.
Processor and Locality Domain Binding
Each process shall have a processor and locality domain binding. Each LWP (lightweight process) shall
have a processor and locality domain binding. The binding assignments for a lightweight process do not
have to match the binding assignments for the process.
Setting the processor or locality domain binding on the process of a multithreaded process, causes all
LWPs (lightweight processes) in the target process to have their binding assignments changed to what is
specified. However, if any LWP belongs to a different processor set such that specified processor or local-
ity domain does not contribute to that processor set, the binding assignment for such an LWP is not
changed.
Section 2−−166 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: August 2003