HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
Obtaining Processor and Locality Domain Binding Type
These options return the current binding type for the specified process or LWP.
int mpctl(mpc_request_t request, spu_t spu, pid_t pid);
int mpctl(mpc_request_t request, spu_t spu, lwpid_t lwpid);
The request argument determines the precise action to be taken by
mpctl and is one of the following:
MPC_GETPROCESS_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibility.
This request returns
MPC_ADVISORY or MPC_MANDATORY
to indicate the
current binding type of the process specified by pid. The spu argument is ignored.
If the target process has a binding type of something other than
MPC_MANDATORY the value MPC_ADVISORY will be returned.
MPC_GETPROCESS_BINDVALUE
This request returns the current binding type of the process specified by pid. The
spu argument is ignored.
Current valid return values are
MPC_NO_BINDING
(no binding),
MPC_SPU_BINDING (advisory processor binding),
MPC_SPU_FORCED_BINDING
(processor binding), and MPC_LDOM_BINDING
(locality domain binding). Other binding types may be added in future releases
and returned via this option. Applications using this option should be written to
handle other return values in order to continue working on future releases.
MPC_GETLWP_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibility.
This request returns
MPC_ADVISORY or MPC_MANDATORY
to indicate the
current binding type of the LWP specified by lwpid. The spu argument is ignored.
If the target LWP has a binding type of something other than
MPC_MANDATORY
the value MPC_ADVISORY will be returned.
MPC_GETLWP_BINDVALUE
This request returns the current binding type of the LWP specified by lwpid. The
spu argument is ignored.
Current valid return values are
MPC_NO_BINDING
(no binding),
MPC_SPU_BINDING (advisory processor binding),
MPC_SPU_FORCED_BINDING
(processor binding), and MPC_LDOM_BINDING
(locality domain binding). Other binding types may be added in future releases
and returned via this option. Applications using this option should be written to
handle other return values in order to continue working on future releases.
Launch Policies
Each process shall have a launch policy. Each lightweight process shall have a launch policy. The launch
policy for a lightweight process does not have to match the launch policy for the process.
If specifying a process launch policy and the target process is a multi-threaded process, the launch policy
specified shall only be applied to the process. The launch policies of LWPs within the process shall not be
affected.
When a process creates another process (via fork() or vfork()), the child process will inherit the
parent process’s launch policy (NOT the launch policy of the fork’ing LWP). The initial lightweight process
in the child process shall have a launch policy of MPC_SETLWP_NONE - no launch policy). LWPs other
than the initial LWP shall inherit their launch policy from the creating LWP.
For all launch policies, the target process or LWP is bound to the locality domain on which it was launched.
The target is allowed to execute on any processor within that locality domain.
When setting a launch policy, if the target already has processor or locality domain binding, the existing
binding will not be overwritten. Instead the locality domain in which the target is bound (whether locality
domain binding or processor binding) will be used as the starting locality domain for implementing the
launch policy.
Note: locality domains are tightly tied to the physical components of the underlying system. As a result, the
performance observed when using launch policies based on locality domains may vary from system to
Section 2−−172 Hewlett-Packard Company − 6 − HP-UX 11i Version 1: September 2005