mpctl.2 (2010 09)
m
mpctl(2) mpctl(2)
If the process specified by pid is a multithreaded process, all LWPs (lightweight
processes) in the target process will have their locality domain assignment
changed to what is specified. However, if any LWP belongs to a processor set
different from the target process, and if the specified locality domain does not
contribute any processor to that locality domain, the binding assignment of such
an LWP is not changed.
MPC_SETLWPLDOM
This request synchronously assigns LWP (lightweight process) lwpid to locality
domain ldom. The LWP may now run on any processor within the locality
domain. The new locality domain assignment is returned. This option can be
used to change the locality domain assignment of LWPs in any process.
The lwpid
MPC_SELFLWPID
may be used to refer to the calling LWP.
The ldom
MPC_LDOMNOCHANGE
may be passed to read the current assignment.
The ldom
MPC_LDOMFLOAT
may be used to break any specific-locality domain
assignment. This allows the LWP to float to any locality domain.
When a processor is ready to choose another LWP to execute, and the highest
priority
SCHED_FIFO LWP is bound to a processor in a different locality
domain, then that LWP will not be selected to execute on the selecting processor,
but instead will wait for a processor on the locality domain to which it was
bound. The selecting processor will then choose a lower priority LWP to execute
on the processor.
NOTE: This option will not guarantee compliance with POSIX real-time
scheduling algorithms.
Obtaining Processor and Locality Domain Binding Type
These options return the current binding type for the specified process or LWP.
int mpctl(mpc_request_t request, spu_t spu, pid_t pid);
int mpctl(mpc_request_t request, spu_t spu, lwpid_t lwpid);
The request argument determines the precise action to be taken by mpctl() and is one of the following:
MPC_GETPROCESS_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibil-
ity.
This request returns
MPC_ADVISORY or MPC_MANDATORY
to indicate the
current binding type of the process specified by pid . The spu argument is
ignored. If the target process has a binding type of something other than
MPC_MANDATORY the value MPC_ADVISORY will be returned.
MPC_GETPROCESS_BINDVALUE
This request returns the current binding type of the process specified by pid.
The spu argument is ignored.
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.
MPC_GETLWP_BINDINGTYPE
Warning: This call is OBSOLETE and is only provided for backwards compatibil-
ity.
This request returns
MPC_ADVISORY or MPC_MANDATORY to indicate the
current binding type of the LWP specified by lwpid . The spu argument is
ignored. If the target LWP has a binding type of something other than
MPC_MANDATORY the value MPC_ADVISORY will be returned.
MPC_GETLWP_BINDVALUE
This request returns the current binding type of the LWP specified by lwpid.
The spu argument is ignored.
8 Hewlett-Packard Company − 8 − HP-UX 11i Version 3: September 2010