Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_rad_bind(3) [osf1 man page]

pthread_rad_attach(3)					     Library Functions Manual					     pthread_rad_attach(3)

NAME
pthread_rad_attach, pthread_rad_bind - Attaches or binds a thread to a NUMA Resource Affinity Domain (libpthread library) SYNOPSIS
#include <numa.h> int pthread_rad_attach( pthread_t thread, radset_t radset, ulong_t flags ); int pthread_rad_bind( pthread_t thread, radset_t radset, ulong_t flags ); PARAMETERS
Identifies the thread to be attached or bound to the specified set of Resource Affinity Domains (RADs). Identifies the RAD set to which the thread is to be attached or bound. DESCRIPTION
The pthread_rad_attach() function attaches the thread specified by the thread argument to the RAD set specified by the radset argument. The pthread_rad_bind() function binds the specified thread to the specified RAD set. While both functions assign a home RAD for the thread, an attach operation allows remote execution on other RADs while a bind operation restricts execution to the home RAD. In the following paragraphs, the term "assign" is used when the description refers equally to both the attach and the bind operations. The memory allocation policy for the process will be set to MPOL_THREAD. The home RAD for the process will be selected by the system sched- uler from among the RADs included in radset based on current system load balance and the flags argument. The overflow set (mattr_radset) for the process will be set to radset. The following symbolic values are defined for the flags argument: The requested assignments are mandatory. If this option is not set, the system will consider the request to be a "hint" and may take no action for any or all of specified processes. The thread has small memory requirements, so the system should (for the home RAD) favor those RADs with light CPU loads, independent of their available memory. The thread has large memory requirements, so the system should (for the home RAD) favor those RADs with more available memory, independent of their CPU loads. If the caller does not have partition administration privilege and if the radset argument contains RADs that are not in the caller's parti- tion, an error will be returned. NOTES
The value for the radset argument could be obtained from an nloc() call to assign or migrate the process to a RAD close (or closer) to a particular resource. When obtained in this manner, the radset value will identify RADs that were in the caller's partition at the time of the nloc() call. The partition configuration could change between the call to nloc() and a subsequent call to pthread_rad_attach(), result- ing in an error. An application should be prepared to handle this error, even though it should not be a frequent occurrence. RETURN VALUES
Success. Failure. In this case, the integer value indicates the type of error. Possible errors are as follows: The thread is hard attached (RAD_INSIST) to RADs or has memory wired (locked) on its current RAD such that it cannot be migrated to the specified RAD set. One of more of the RADs in the radset argument or options in the flags argument are invalid. RAD_INSIST and RAD_MIGRATE were specified, and the thread cannot be migrated because insufficient memory exists on RADs in the specified RAD set. The caller does not have appropriate privileges to assign processes to RADs in the specified RAD set. The thread specified by thread does not exist. ERRORS
None. SEE ALSO
Functions: nloc(3), pthread_rad_detach(3) pthread_rad_attach(3)

Check Out this Related Man Page

pthread_nsg_attach(3)					     Library Functions Manual					     pthread_nsg_attach(3)

NAME
pthread_nsg_attach - Attaches a thread to a NUMA Scheduling Group (libpthread library) SYNOPSIS
#include <numa.h> int pthread_nsg_attach( nsgid_t nsg, pthread_t thread, long flags ); PARAMETERS
Specifies the NUMA Scheduling Group (NSG) to which the thread will belong. Identifies the thread to attach to the NSG. Specifies options (bit mask) that affect the attachment. See DESCRIPTION for details. DESCRIPTION
The pthread_nsg_attach() function attaches the thread specified by the thread argument to a NUMA Scheduling Group (NSG) specified by the nsg argument. An NSG is a set of processes and/or threads that will be constrained to reside on the same Resource Affinity Domain (RAD). That is, the "home RAD" for all of the processes/threads in an NSG will be the same, and the entire group will be migrated together, if at all. The thread specified by thread will be removed from any NSG of which it might currently be a member, before being added to the speci- fied NSG. If the specified thread resides on a different RAD, the thread will be reassigned to a single RAD. The home RAD for the thread will be selected as follows: If the specified NSG already has processes/threads attached, the home RAD for the specified thread will be the home RAD for that NSG. If the specified NSG is empty, the home RAD for the thread will be selected based on the setting of the flags argument. The following options are defined for the flags argument: The requested attachment and any implied reassignments are mandatory, overriding any prior binding of the specified thread. If this option is not set, and the thread is bound (RAD_INSIST) to a different RAD such that the system cannot honor the request, the request will fail. The thread has small memory requirements, so the system should favor (for the home RAD) those RADs with light CPU loads, independent of their available memory. This flag applies only when attaching to an empty NSG. The thread has large memory requirements, so the system should favor (for the home RAD) those RADs with more available memory, independent of their CPU loads. This flag only applies when attaching to an empty NSG. Arrange for the existing memory (stack pages) of a thread that is assigned a new home RAD to be migrated to the new RAD. If omitted, only newly allocated pages will be allocated on the new home RAD. Exist- ing pages will migrate if/when they experience a high rate of remote cache misses. Migration will occur only for pages-in-memory objects that have inherited the process's default memory allocation policy. Wait for the requested memory migration to be completed. Effectively, this flag specifies "migrate now!". RETURN VALUES
Success. Failure. In this case, the returned integer indicates the type of error. Possible errors include the following: The caller does not have execute permission required to attach the thread based on the NSG's permissions. The thread specified by thread is hard attached (RAD_INSIST) to RADs or has memory wired (locked) on its current RAD such that it cannot be migrated to the common RAD selected for the NSG. The value of the flags argument is invalid. NSG_INSIST and NSG_MIGRATE were specified and no RAD can be found with sufficient memory to accommodate the resulting group. The thread specified by the thread argument does not exist. ERRORS
None. SEE ALSO
Functions: nsg_attach_pid(3), nsg_get(3), numa_intro(3) Files: numa_types(4) pthread_nsg_attach(3)
Man Page