HP-UX Reference (11i v2 04/09) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
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.
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
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
, and
MPC_LAUNCH_POLICY_NONE
launch policies.
When a launch policy is set for a process, it becomes the root of a new launch tree. The launch policy
determines which processes become part of the launch tree. The new processes in the launch tree will be
distributed 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 distri-
bution 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 process 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 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 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
exhibit 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
performance 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.
HP-UX 11i Version 2: September 2004 − 7 − Hewlett-Packard Company Section 2−−173