*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> nsg_attach_pid (3)              
Title
Content
Arch
Section
 

nsg_attach_pid(3)

Contents


NAME    [Toc]    [Back]

       nsg_attach_pid, nsg_detach_pid - Attaches a process to, or
       detaches a process from a NUMA Scheduling  Group  (libnuma
       library)

SYNOPSIS    [Toc]    [Back]

       #include <numa.h>

       int nsg_attach_pid(
               nsgid_t nsg,
               pid_t pid,
               ulong_t flags ); int nsg_detach_pid(
               pid_t pid );

PARAMETERS    [Toc]    [Back]

       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.  A child process will
       not inherit the NSG of the parent and, therefore,  can  be
       assigned  to any eligible RAD on the system.  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    [Toc]    [Back]

       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  selfdirected.
  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    [Toc]    [Back]

       The  caller  must  have partition administration privilege
       and the process identified by pid must be in the  caller's
       partition.

RETURN VALUES    [Toc]    [Back]

       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    [Toc]    [Back]

       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 specify 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 effective 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 specified 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    [Toc]    [Back]

      
      
       Functions:           nsg_init(3),           numa_intro(3),
       pthread_nsg_attach(3)

       Files: numa_types(4)



                                                nsg_attach_pid(3)
[ Back ]
 Similar pages
Name OS Title
nsg_get_pids Tru64 Return a list of a NUMA Scheduling Group's process identifiers (libnuma library)
pthread_nsg_detach Tru64 Detaches a thread from a NUMA Scheduling Group (libpthread library)
rad_attach_pid Tru64 Attaches or binds a process to a Resource Affinity Domain by process ID (libnuma library)
rad_bind_pid Tru64 Attaches or binds a process to a Resource Affinity Domain by process ID (libnuma library)
pthread_nsg_attach Tru64 Attaches a thread to a NUMA Scheduling Group (libpthread library)
nsg_init Tru64 Look up or create a NUMA Scheduling Group (libnuma library)
nsg_destroy Tru64 Destroys a NUMA Scheduling Group (libnuma library)
nsg_set Tru64 Set NUMA Scheduling Group owner and permissions (libnuma library)
nsg_get Tru64 Query status of a NUMA Scheduling Group (libnuma library)
numa_query_pid Tru64 Returns NUMA-related information for the specified process identifier (libnuma library)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service