HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)

m
mpctl(2) mpctl(2)
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
,orMPC_LAUNCH_POLICY_NONE
to
indicate the current launch policy of the process specified by pid. Other launch pol-
icies 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.
MPC_SETPROCESS_RR
This call establishes a round robin launch policy for the specified process. Round
robin indicates that successive child processes are launched on different locality
domains until all domains in the system have been used by processes in this fam-
ily. At that point, the selection of locality domains begins again from the system
wide pool of domains. As with all launch policies, the process is bound to the local-
ity domain on which it was launched. The ldom argument is ignored.
MPC_SETPROCESS_FILL
This call establishes a fill first launch policy for the specified process. Fill first indi-
cates that successive child processes are launched on the same locality domain as
their parent process until one process has been created for each processor in the
domain. At that point, a new locality domain is selected and successive processes
launched there until there is one process per processor. All domains in the system
will be used before the original domain is selected again. As with all launch poli-
cies, the process is bound to the locality domain on which it was launched. The
ldom argument is ignored.
MPC_SETPROCESS_PACKED
This call establishes a packed launch policy for the specified process. Packed indi-
cates that successive child processes are launched on the same locality domain as
their parent process. As with all launch policies, the process is bound to the local-
ity domain on which it was launched. The ldom argument is ignored.
MPC_SETPROCESS_LEASTLOAD
This call establishes a least loaded launch policy for the specified process. Least
loaded indicates that successive child processes are launched on the least loaded
locality domain in the system regardless of the location of their parent process. As
with all launch policies, the process is bound to the locality domain on which it was
launched. The ldom argument is ignored.
MPC_SETPROCESS_NONE
This call unsets any launch policy in the process. In removing a launch policy, the
process is no longer bound to the locality domain on which it was launched. The
ldom argument is ignored.
For LWP launch policies use:
int mpctl(mpc_request_t request, ldom_t ldom, lwpid_t lwpid);
The request argument determines the precise action to be taken by mpctl and is one of the following:
MPC_GETLWP_LAUNCH
This request currently returns MPC_LAUNCH_POLICY_RR,
MPC_LAUNCH_POLICY_FILL, MPC_LAUNCH_POLICY_PACKED,
MPC_LAUNCH_POLICY_LEASTLOAD,orMPC_LAUNCH_POLICY_NONE to
indicate the current launch policy of the LWP specified by lwpid. Other launch pol-
icies 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
HP-UX 11i Version 1: September 2005 7 Hewlett-Packard Company Section 2173