HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
When setting a process launch policy, the launch policy specified shall only be applied to the process. The
launch policies of LWPs within the process shall not be affected.
The mpctl(2) interface currently supports the following launch policies:
MPC_LAUNCH_POLICY_RR
MPC_LAUNCH_POLICY_FILL
MPC_LAUNCH_POLICY_PACKED
MPC_LAUNCH_POLICY_LEASTLOAD
MPC_LAUNCH_POLICY_RR_TREE
MPC_LAUNCH_POLICY_FILL_TREE
MPC_LAUNCH_POLICY_NONE
When a launch policy is set for a process, it becomes the root of a new launch tree. The launch policy deter-
mines which processes become part of the launch tree. The new processes in the launch tree will be distri-
buted among available locality domains based on the launch policy for that launch tree.
For MPC_LAUNCH_POLICY_RR
and MPC_LAUNCH_POLICY_FILL
launch policies, the root process
and only its direct children form the launch tree. The new child process becomes the root of a new launch
tree. Since the launch tree for these policies includes only the parent and its direct children, their distribu-
tion will be more deterministic.
For
MPC_LAUNCH_POLICY_RR_TREE
and MPC_LAUNCH_POLICY_FILL_TREE
launch policies, any
new process created by the root process or any of its descendents become part of the launch tree. When
creating a new process with these policies, if the root of the launch tree has different launch policy than the
creator of the new process, the new process becomes the root of a new launch tree. The locality domains
selected for new processes in the tree are dependent on the order in which they are created. So, the pro-
cess distribution for an application with several levels in the launch tree may vary across different runs.
When the launch policy for a process in a launch tree is changed, it becomes the root of a new launch tree.
However, the distribution of existing processes in the old launch tree is not changed.
The LWP launch policy works the same as process launch policy except that LWP launch tree is contained
within a process. When an LWP with a launch policy creates a new process, the initial LWP in the new
process becomes the root of a new LWP launch tree.
The
MPC_LAUNCH_POLICY_NONE
indicates there is no explicit launch policy for the process or LWP.
The operating system is free to select the optimal distribution of processes and LWPs. No explicit locality
domain binding is applied to new processes and LWPs with
MPC_LAUNCH_POLICY_NONE
policy, unless
it inherits the binding from the creator process or LWP.
If the processor set binding for a process or an LWP in a launch tree is changed to another processor set,
that process or LWP becomes the root of a new launch tree. When creating a new process or an LWP, if the
root of the launch tree is found to be in a different processor set, the new process or LWP is made the root
of a new launch tree.
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
system. For example, a system which contains 4 locality domains, each containing 32 processors, may exhi-
bit different performance behaviors from a system that contains 32 locality domains with 4 processors per
domain. The launch policy that provides optimal performance on one system may not provide optimal per-
formance on a different system for the same application.
For process launch policies 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_GETPROCESS_LAUNCH
This request currently returns MPC_LAUNCH_POLICY_RR,
MPC_LAUNCH_POLICY_FILL, MPC_LAUNCH_POLICY_PACKED
,
MPC_LAUNCH_POLICY_LEASTLOAD, MPC_LAUNCH_POLICY_RR_TREE
,
MPC_LAUNCH_POLICY_FILL_TREE,orMPC_LAUNCH_POLICY_NONE
to
indicate the current launch policy of the process specified by pid. Other launch
policies 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 con-
tinue working on future releases. The ldom argument is ignored.
HP-UX 11i Version 2: December 2007 Update − 8 − Hewlett-Packard Company 205