Index Index for
Section 4
Index Alphabetical
listing for N
Bottom of page Bottom of
page

numa_types(4)

NAME

numa_types - Data types used by NUMA application interfaces

SYNOPSIS

#include <numa_types.h>

DESCRIPTION

This reference page lists and describes the data types, flags, structures, and unions that are defined in the <numa_types.h> header file to support the Compaq Tru64 Unix NUMA APIs. For all data types containing a radset_t or a cpuset_t, it is the programmer's responsibility to create the respective radset or cpuset for that structure via radsetcreate() or cpusetcreate(). Note that numa_types.h is indirectly included by the <numa.h> header file, which is the header file more frequently specified in the SYNOPSIS sections of reference pages for NUMA-related functions. Definitions The <numa_types> header defines the following data types, flags, structures, and unions, and associated symbolic values: iopath_t An opaque type that represents an I/O path between a device, represented by an (rsrctype_t, rsrcdescr_t) pair, and some other resource, also represented by an (rsrctype_t, rsrcdescr_t) pair. The second pair could represent a resource such as a Resource Affinity Domaim (RAD), memory, processor, or process. memalloc_attr_t A structure type that defines the policy and associated parameters for memory allocation. The memalloc_attr structures are associated with memory objects and with processes and threads. This structure contains the following members: memalloc_policy_t mattr_policy The allocation policy that these attributes represent. radid_t mattr_rad The primary or preferred RAD (region) from which to allocate. int mattr_distance The distance to overflow. int mattr_stride The stride (in pages) for striped allocation. int mattr_pagesz The page size in bytes. radset_t mattr_radset The overflow or stripe set for the allocation. memalloc_policy_t An enumeration type that determines, along with associated parameter attributes, how memory will be allocated for a memory object or a kernel memory allocation request. Supported policies are: MPOL_DIRECTED Allocate pages from a specified (meaning preferred) RAD with overflow into a specified, possibly NULL, overflow RAD set. MPOL_THREAD Equivalent to MPOL_DIRECTED but with the preferred RAD taken from the default policy of the thread context in which the memory allocation is being made. MPOL_STRIPED Allocate pages striped across a specified set of RADs by using a specified (page multiple) stripe. Starting with a specified RAD, pages will be allocated from RADs in the stripe set in increasing RAD number and will wrap from the highest numbered RAD in the set to the lowest. MPOL_REPLICATED Replicate pages on the home RAD of the thread that caused the pages to be allocated. The following modifer may be combined (by using a logical OR operation) with the preceding policies: MPOL_NO_MIGRATE Disable automatic migration of pages by the system. nmemalloc_range_t A structure used by the nmadvise() function when its len parameter is negative, that describes the characteristics of an array of memory regions. This structure contains the following members: void *addr A pointer to the virtual address. size_t len The length of the address range in bytes. radid_t rad The primary or preferred RAD. nsgid_t Identifier for a NUMA Scheduling Group (NSG). numa_attr_t A structure that describes the NUMA topology attributes. This structure contains the following members: rsrc_type_t nattr_type The type of resource. rsrc_descr_t nattr_descr The resource descriptor. ulong nattr_distance The distance to the requested resource. Reference pages for specific functions provide more information. ulong nattr_flags Various flags used by different routines. The reference pages for specific functions list and describe flag symbolic values. radid_t Identifier for a Resource Affinity Domain (RAD), which is a grouping of basic system resources. On some NUMA CC platforms, this resource grouping is known as a "Quad Building Block." The radid_t data type is a generic, integral type, for which there is the following symbolic value: RAD_NONE No valid RAD ID. Functions return RAD_NONE when no RAD matches the specified criteria, there are no more RADs in a CPU set, and so forth. radset_t A set of RADs. This type is used to specify a set of radid_t values to NUMA and partitioning APIs. A subset of these APIs perform operations on a set of RADs and manage radset_t as an opaque type. rad_cursor_t A opaque type used in enumeration/iteration operations on a RAD set. This type stores the current cursor position during a scan of the members in a RAD set. rad_info_t A structure that describes the state and resources associated with a RAD. This structure contains the following members: int rinfo_version The RAD revision number. radid_t rinfo_radid The RAD identifier. rad_state_t rinfo_state The RAD state. int rinfo_max_rads The maximum number of RADs on the system. ssize_t rinfo_physmem The amount of physical memory present in the RAD. ssize_t rinfo_freemem The current amount of free memory available in the RAD. cpuset_t rinfo_cpus The set of CPUs associated with the RAD. rad_state_t A RAD's software state. The defined states are: RAD_ONLINE The specified RAD exists and is on-line. Processes and threads may be assigned to and memory allocated to the RAD. RAD_OFFLINE The specified RAD exists but is not currently on line. No processes or threads may be assigned to nor memory allocated to this RAD; however, its resource complement may be queried. RAD_NOTPRESENT The specified RAD does not exist in the system. No further information is available. rsrctype_t An enumeration type that specifies the kind of resource with which affinity is desired. Anrsrctype_t argument is used in APIs that perform NUMA topology queries and resource binding. The following symbolic values identify the type of resource: R_RAD A RAD set. R_FILDES A file or device referenced by an open file descriptor. R_PATH A file or device specified by a pathname. R_SHM A System V shared memory segment that is referenced by a shared memory ID. R_PID A process that is referenced by a pid_t identifier. R_MEM A physical memory mapped region that is referenced by a process virtual address. This type is used to locate RADs within a specified distance from a particular memory location. See nloc(3) for more information. R_NSG A NUMA Scheduling Group that is referenced by an nsgid_t identifier. rsrcdescr_t A union of the various resource handles that are represented by a resource type (rsrctype_t). Along with rsrctype_t, rsrcdescr_t is specified to the NUMA APIs that perform NUMA topology queries and resource binding. An rsrcdescr_t union contains the following members: radset_t rd_radset A set of RADs when resource type is R_RAD. int rd_fd A file descriptor when resource type is R_FILDES. char *rd_pathname A pathname of a file or device when resource type is R_PATH. int rd_shmid A System V shared memory ID when resource type is R_SHM. pid_t rd_pid A process ID when resource type is R_PID. void *rd_addr A process virtual memory address when resource type is R_MEM. nsgid_t rd_nsg A NUMA Scheduling Group ID when resource type is R_NSG. struct_nsgid_ds A structure that specifies the access permissions and associated parameters and statistics for a NUMA Scheduling Group (NSG). This structure contains the following members: struct ipc_perm nsg_perm A subordinate structure that contains the NSG access permissions. int nsg_nattach The number of processes attached to the NSG. struct_nsg_thread A structure that specifies a thread (process ID and thread ID) attached to an NSG. This structure contains the following members: pid_t nsgth_pid The process ID of a thread that is attached to an NSG. unsigned int nsgth_thread The thread ID (index) of a thread that is attached to an NSG.

SEE ALSO

Functions: nloc(3), numa_intro(3)

Index Index for
Section 4
Index Alphabetical
listing for N
Top of page Top of
page