HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
The lwpid MPC_SELFLWPID
may be used to refer to the calling LWP.
The spu
MPC_SPUNOCHANGE
may be passed to read the current assignment.
The spu
MPC_SPUFLOAT may be used to break any specific-processor assignment.
This allows the LWP to float to any processor.
NOTE: This call is advisory. If the scheduling policy for a LWP conflicts with this
processor assignment, the scheduling policy takes precedence. For example, when
a processor is ready to choose another LWP to execute, and the highest priority
SCHED_FIFO LWP is bound to a different processor, that the LWP will execute
on the selecting processor rather than waiting for the specified processor to which
it was bound.
MPC_SETLWP_FORCE
This call is identical to MPC_SETLWP except that the processor binding will take
precedence over the scheduling policy. This call is synchronous. For example,
when a processor is ready to choose another LWP to execute, and the highest
priority SCHED_FIFO LWP is bound to a different processor, that LWP will not be
selected to execute on the selecting processor, but instead will wait for the specified
processor 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 schedul-
ing algorithms.
For locality domain binding use:
int mpctl(mpc_request_t request, ldom_t ldom, pid_t pid);
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_SETLDOM This request synchronously assigns process pid to locality domain ldom. The pro-
cess may now run on any processor within the locality domain in its processor set.
The new locality domain assignment is returned.
The pid
MPC_SELFPID may be used to refer to the calling process.
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 process to float to any locality domain.
When a processor in one locality domain is ready to choose another process to exe-
cute, and the highest priority
SCHED_FIFO process is bound to a different locality
domain, that process will not be selected to execute on the selecting processor, but
instead wait for a processor in the specified locality domain to which it was bound.
The selecting processor will then choose a lower priority process to execute on the
processor.
NOTE: This option will not guarantee compliance with POSIX real-time schedul-
ing algorithms.
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 pro-
cessor 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 is only available to
change the assignment for LWPs in the current 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.
218 Hewlett-Packard Company − 6 − HP-UX 11i Version 3: February 2007