Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_nsg_detach(3) [osf1 man page]

pthread_nsg_detach(3)					     Library Functions Manual					     pthread_nsg_detach(3)

NAME
pthread_nsg_detach - Detaches a thread from a NUMA Scheduling Group (libpthread library) SYNOPSIS
#include <numa.h> int pthread_nsg_detach( pthread_t thread ); PARAMETERS
Identifies the thread to detach from a NUMA Scheduling Group (NSG). DESCRIPTION
The pthread_nsg_detach() function detaches the thread specified by the thread argument from the NSG to which it is attached. The function does not reassign the thread to a new NSG. RETURN VALUES
Success. Failure. In this case, the integer value indicates the type of error. Possible errors include the following: Based on the NSG's permissions, the caller does not have execute permission, which is required to detach a thread. The specified thread is hard attached (RAD_INSIST) to a RAD or has memory wired (locked) on its current RAD such that it cannot be migrated to a 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 NSG. The thread argument specifies a thread that does not exist. ERRORS
None. SEE ALSO
Functions: nsg_attach_pid(3), nsg_get(3), numa_intro(3) Files: numa_types(4) pthread_nsg_detach(3)

Check Out this Related Man Page

nsg_attach_pid(3)					     Library Functions Manual						 nsg_attach_pid(3)

NAME
nsg_attach_pid, nsg_detach_pid - Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library) SYNOPSIS
#include <numa.h> int nsg_attach_pid( nsgid_t nsg, pid_t pid, ulong_t flags ); int nsg_detach_pid( pid_t pid ); PARAMETERS
Specifies the NUMA Scheduling Group (NSG) to which the listed process will be attached. Specifies the process ID to attach to (or detach from) the NSG. Specifies a bit mask of options that affect the attachment. The following options are defined for the flags argument: The requested attachment and any implied reassignment is mandatory, overriding any prior attachment and/or binding of the specified processes. Arrange for existing memory of the process that is assigned a new home RAD to be migrated to the new RAD. If this option is omitted, only newly allocated pages will be allocated on the new home RAD. Existing pages will migrate if or 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, if possible. If insufficient resources exist to satisfy the request, the function will return without having completed the migration. If NSG_INSIST is also specified, memory not migrated will be paged out. See DESCRIPTION for more detail about these options. DESCRIPTION
The nsg_attach_pid() function attaches the process identified by the pid argument to an NSG. 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 or threads in an NSG will be the same, and the entire group will be migrated together, if at all. The process identified by pid will be removed from any NSG of which it might currently be a member, before adding it to the specified NSG. If the pid argument is NULL, then the call is self-directed. That is, the function behaves as if the current process ID were specified. The nsg_detach_pid() will remove pid from its current NSG, if any, and will not add pid to any new NSG. It is equivalent to the nsg_attach_pid() function with the nsg argument of NSG_NONE. RESTRICTIONS
The caller must have partition administration privilege and the process identified by pid must be in the caller's partition. RETURN VALUES
Success. In this case, the nsg_attach_pid() function successfully attached to the NSG specified by nsg. Success. In this case, the nsg_detach_pid() function successfully detached from its NSG. Failure. In this case, errno is set to indicate the error. ERRORS
If the nsg_attach_pid() function fails, it sets errno to one of the following values for the condition specified: The caller does not have execute permission required to attach processes to the NSG. The process specified by pid does not exist. The nsg argument does not spec- ify a valid NSG, or one or more options in the flags argument are invalid. The specified process is hard attached (RAD_INSIST) to RADs or has memory wired (locked) on its current RAD such that the process cannot be migrated to the RAD selected for the NSG. The NSG_INSIST and NSG_MIGRATE options were specified and no RAD can be found with sufficient memory to accommodate the resulting group. The real or effec- tive user ID of the caller does not match the real or effective user ID of the process specified in pid. If the nsg_detach_pid() function fails, it sets errno to one of the following values for the condition specified: The caller does not have execute permission, which is required to detach processes from the NSG. The process specified by pid does not exist. The process speci- fied by pid is not a member of an NSG. The specified process is hard attached (RAD_INSIST) to RADs or has memory wired (locked) on its current RAD such that the process cannot be detached. The real or effective user ID of the caller does not match the real or effective user ID of the process specified in pid. SEE ALSO
Functions: nsg_attach_thread(3), nsg_init(3), numa_intro(3) Files: numa_types(4) nsg_attach_pid(3)
Man Page