mpctl.2 (2010 09)

m
mpctl(2) mpctl(2)
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 need not match the launch policy for the process. The launch pol-
icy determines the locality domain where the newly created process or LWP will be launched in a
ccNUMA system. The locality domains covered by a process’s or LWP’s processor set are the available
locality domains.
When a process creates another process (via
fork() or vfork()), the child process will inherit the
parent process’s launch policy. The initial LWP in the child process will inherit the launch policy of the
creating LWP (and not that of its process). Other LWPs in a multi-threaded process 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 local-
ity 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() 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
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 the creator process or LWP.
HP-UX 11i Version 3: September 2010 9 Hewlett-Packard Company 9