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

m
mpctl(2) mpctl(2)
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 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 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 scheduling
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 still run on any processor within the locality domain. 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.
For example, when a processor in one locality domain is ready to choose another
process to execute, and the highest priority
SCHED_FIFO process is bound to a
different locality domain, that process will not be selected to execute on the select-
ing 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 pro-
cess to execute on the processor.
Note: This option will not guarantee compliance with POSIX real-time scheduling
algorithms.
If the process specified by pid is a multithreaded process, all LWPs (lightweight
processes) in the target process with the same processor set binding as the target
process will have their locality domain assignment changed to what is specified.
The processor set binding takes precedence over processor or locality domain bind-
ing.
MPC_SETLWPLDOM
This request synchronously assigns LWP (lightweight process) lwpid to locality
domain ldom. The LWP may still 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.
For example, when a processor is ready to choose another LWP to execute, and the
highest priority SCHED_FIFO LWP is bound to processor in a different locality
domain, that LWP will not be selected to execute on the selecting processor, but
instead 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 proces-
sor.
Note: This option will not guarantee compliance with POSIX real-time scheduling
algorithms.
HP-UX 11i Version 1: September 2005 5 Hewlett-Packard Company Section 2171