HP-UX Reference (11i v2 03/08) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
MPC_SETLWP_RR This call establishes a round robin launch policy (
MPC_LAUNCH_POLICY_RR
)
for the specified LWP. The successive child LWPs are launched on different
locality domains in a round robin manner until all available locality domains
have been used by LWPs in the launch tree. At that point, the selection of local-
ity domains begins again from the original locality domain. The ldom argument
is ignored.
MPC_SETLWP_FILL
This call establishes a fill first launch policy (
MPC_LAUNCH_POLICY_FILL
) for
the specified LWP. The successive child LWPs are launched on the same locality
domain as their parent LWP until one thread has been created for each avail-
able processor in the domain. At that point, a new locality domain is selected
and successive LWPs are launched there until there is one LWP per processor.
All available locality domains will be used before the original domain is selected
again. The ldom argument is ignored.
MPC_SETLWP_PACKED
This call establishes a packed launch policy (
MPC_LAUNCH_POLICY_PACKED
)
for the specified LWP. The successive child LWPs are launched on the same
locality domain as their parent LWP. The ldom argument is ignored.
MPC_SETLWP_LEASTLOAD
This call establishes a least loaded launch policy
(MPC_LAUNCH_POLICY_LEASTLOAD
) for the specified LWP. The successive
child LWPs are launched on the least loaded locality domain in the processor set
regardless of the location of their parent LWP. The ldom argument is ignored.
MPC_SETLWP_RR_TREE
This call establishes a tree based round robin launch policy
(MPC_LAUNCH_POLICY_RR_TREE
) for the specified LWP. This request differs
from
MPC_SETPROCESS_RR
in which LWPs become part of the launch tree.
This launch policy includes all descendents of the target LWP in the launch tree.
The ldom argument is ignored.
MPC_SETLWP_FILL_TREE
This call establishes a tree based fill first launch policy
(MPC_LAUNCH_POLICY_FILL_TREE
) for the specified LWP. This request
differs from
MPC_SETPROCESS_FILL
in which LWPs become part of the
launch tree. This launch policy includes all descendents of the target LWP in the
launch tree. The ldom argument is ignored.
MPC_SETLWP_NONE
This call unsets any launch policy in the LWP. The system will employ a default,
optimal policy in determining where the newly created LWP will be launched.
The existing binding of the LWP is not changed. The ldom argument is ignored.
To change the processor assignment, locality domain assignment, or launch policy of another process, the
caller must be either a member of a group having
PRIV_MPCTL access, have the same effective user id of
the target process, or be the super-user.
ERRORS
If
mpctl fails, -1 will be returned. If mpctl is successful, the value returned will be as specified for that
command/option. Note: in some cases a negative number other than -1 may be returned that indicates a
successful return. In general, mpctl fails if one or more of the following is true:
[EINVAL] request is an illegal number.
[EINVAL] request is
MPC_GETNEXTSPU or MPC_GETNEXTSPU_SYS and spu identifies the last
processor. Or request is MPC_GETNEXTLDOM or MPC_GETNEXTLDOM_SYS and ldom
identifies the last locality domain.
[ESRCH] pid or lwpid identifies a process or LWP that does not exist.
[EINVAL] request is to bind a process or an LWP to a processor or locality domain that is not in
the processor set of the specified process or LWP.
[EPERM] request is
MPC_SETPROCESS, MPC_SETPROCESS_FORCE,orMPC_SETLDOM, spu is
not MPC_SPUNOCHANGE or MPC_LDOMNOCHANGE, pid identifies another process, and
Section 2−−172 Hewlett-Packard Company − 9 − HP-UX 11i Version 2: August 2003