|
Barrelfish
|
General Numa functions. More...
Functions | |
| errval_t | numa_available (void) |
| checks if numa support is available More... | |
| nodeid_t | numa_max_node (void) |
| returns the highest node number available on the current system. More... | |
| coreid_t | numa_max_core (void) |
| returns the highest ID of the present cores More... | |
| nodeid_t | numa_current_node (void) |
| returns the current node the domain is running on More... | |
| nodeid_t | numa_num_possible_nodes (void) |
| returns the size of the node mask More... | |
| nodeid_t | numa_num_configured_nodes (void) |
| Obtains the number of all memory nodes in the system. More... | |
| struct bitmap * | numa_get_mems_allowed (void) |
| obtains the nodes the domain is allowed to allocate memory from More... | |
| coreid_t | numa_num_configured_cpus (void) |
| returns the total numberof CPUs in the system More... | |
| coreid_t | numa_num_task_cpus (void) |
| returns the number of cpus that the calling domain is allowed to use. More... | |
| nodeid_t | numa_num_task_nodes (void) |
| returns the number of nodes on which the calling domain is allowed to allocate memory More... | |
| size_t | numa_node_size (nodeid_t node, uintptr_t *freep) |
| obtains the size of a node More... | |
| lpaddr_t | numa_node_base (nodeid_t node) |
| obtains the base address of the numa node More... | |
| nodeid_t | numa_preferred (void) |
| returns the preferred node of the current task. More... | |
| void | numa_set_preferred (nodeid_t node) |
| sets the preferred node for the current task to node More... | |
| errval_t | numa_run_on_node (nodeid_t node) |
| runs the current domain on a specific node. More... | |
| errval_t | numa_run_on_node_mask (struct bitmap *nodemask) |
| runs the current domain only on nodes specified in nodemask. More... | |
| struct bitmap * | numa_get_run_node_mask (void) |
| returns a mask of CPUs on which the current task is allowed to run. More... | |
| void | numa_set_bind_policy (numa_policy_t strict) |
| specify the memory bind policy More... | |
| void | numa_set_strict (numa_policy_t strict) |
| enable or disable the strict allocation policy More... | |
| uint32_t | numa_distance (nodeid_t from, nodeid_t to) |
| reports the distance in the machine topology between two nodes More... | |
| errval_t | numa_sched_getaffinity (domainid_t did, struct bitmap *mask) |
| retrieves a bitmask of the cpus on which a domain may run More... | |
| errval_t | numa_sched_setaffinity (domainid_t did, struct bitmap *mask) |
| sets a domain's allowed cpu's to those cpu's specified in mask. More... | |
| size_t | numa_pagesize (void) |
| returns the page size More... | |
| errval_t | numa_node_to_cpus (nodeid_t node, struct bitmap *mask) |
| converts a node number to a bitmask of CPUs More... | |
| nodeid_t | numa_node_of_cpu (coreid_t cpu) |
| returns the node that a cpu belongs to More... | |
| coreid_t | numa_num_node_cpus (nodeid_t node) |
| gets the number of cores for the given numa node More... | |
Variables | |
| struct bitmap * | numa_all_nodes_ptr |
| bitmask that is allocated by the library with bits representing all nodes on which the calling task may allocate memory. | |
| struct bitmap * | numa_no_nodes_ptr |
| points to a bitmask that is allocated by the library and left all zeroes. | |
| struct bitmap * | numa_all_cpus_ptr |
| points to a bitmask that is allocated by the library with bits representing all cpus on which the calling task may execute. | |
| struct numa_topology | numa_topology |
| data structure representing the numa topology More... | |
General Numa functions.
| errval_t numa_available | ( | void | ) |
checks if numa support is available
this function must be called before any of the other functions of libnuma. during the call to numa_available the library also gets initialized
| nodeid_t numa_current_node | ( | void | ) |
returns the current node the domain is running on
| uint32_t numa_distance | ( | nodeid_t | from, |
| nodeid_t | to | ||
| ) |
reports the distance in the machine topology between two nodes
| from | source node to measure the distance |
| to | target node to measure the distance |
The factors are a multiple of 10. A node has distance 10 to itself.
| struct bitmap* numa_get_mems_allowed | ( | void | ) |
obtains the nodes the domain is allowed to allocate memory from
returns the mask of nodes from which the process is allowed to allocate memory in it's current cpuset context.
| struct bitmap* numa_get_run_node_mask | ( | void | ) |
returns a mask of CPUs on which the current task is allowed to run.
| coreid_t numa_max_core | ( | void | ) |
returns the highest ID of the present cores
| nodeid_t numa_max_node | ( | void | ) |
returns the highest node number available on the current system.
| lpaddr_t numa_node_base | ( | nodeid_t | node | ) |
obtains the base address of the numa node
| nodeid_t numa_node_of_cpu | ( | coreid_t | cpu | ) |
returns the node that a cpu belongs to
| cpu | ID of the core |
| size_t numa_node_size | ( | nodeid_t | node, |
| uintptr_t * | freep | ||
| ) |
obtains the size of a node
| node | ID of the NUMA node |
| freep | returns the number of available bytes of the node |
returns the memory size of a node. If the argument freep is not NULL, it used to return the amount of free memory on the node. On error it returns NUMA_NODE_INVALID
| errval_t numa_node_to_cpus | ( | nodeid_t | node, |
| struct bitmap * | mask | ||
| ) |
converts a node number to a bitmask of CPUs
| node | the ID of the node |
| mask | bitmap representing the CPUs of this node |
The user must pass a bitmask structure with a mask buffer long enough to represent all possible cpu's
| coreid_t numa_num_configured_cpus | ( | void | ) |
returns the total numberof CPUs in the system
returns the number of cpus in the system. This count includes any cpus that are currently disabled.
| nodeid_t numa_num_configured_nodes | ( | void | ) |
Obtains the number of all memory nodes in the system.
returns the number of memory nodes in the system. This count includes any nodes that are currently disabled.
| coreid_t numa_num_node_cpus | ( | nodeid_t | node | ) |
gets the number of cores for the given numa node
| node | NUMA node to get the number of cores |
| nodeid_t numa_num_possible_nodes | ( | void | ) |
returns the size of the node mask
| coreid_t numa_num_task_cpus | ( | void | ) |
returns the number of cpus that the calling domain is allowed to use.
| nodeid_t numa_num_task_nodes | ( | void | ) |
returns the number of nodes on which the calling domain is allowed to allocate memory
| size_t numa_pagesize | ( | void | ) |
returns the page size
| nodeid_t numa_preferred | ( | void | ) |
returns the preferred node of the current task.
| errval_t numa_run_on_node | ( | nodeid_t | node | ) |
runs the current domain on a specific node.
| node | ID of the node to run the domain on |
Passing -1 permits the kernel to schedule on all nodes again
| errval_t numa_run_on_node_mask | ( | struct bitmap * | nodemask | ) |
runs the current domain only on nodes specified in nodemask.
| nodemask | bitmap representing the nodes to run the domain on |
| errval_t numa_sched_getaffinity | ( | domainid_t | did, |
| struct bitmap * | mask | ||
| ) |
retrieves a bitmask of the cpus on which a domain may run
| did | domain ID |
| mask | returned bitmask |
| errval_t numa_sched_setaffinity | ( | domainid_t | did, |
| struct bitmap * | mask | ||
| ) |
sets a domain's allowed cpu's to those cpu's specified in mask.
| did | domain ID |
| mask | bitmap representing the CPUs |
| void numa_set_bind_policy | ( | numa_policy_t | strict | ) |
specify the memory bind policy
| strict | numa policy to apply |
specifies whether calls that bind memory to a specific node should use the preferred policy or a strict policy.
| void numa_set_preferred | ( | nodeid_t | node | ) |
sets the preferred node for the current task to node
| node | ID of the node to set preferred |
The system will attempt to allocate memory from the preferred node, but will fall back to other nodes if no memory is available on the the preferred node
Passing a node of -1 argument specifies local allocation
| void numa_set_strict | ( | numa_policy_t | strict | ) |
enable or disable the strict allocation policy
| strict | numa policy to apply |
s a flag that says whether the functions allocating on specific nodes should use a strict policy. Strict means the allocation will fail if the memory cannot be allocated on the target node.
| struct numa_topology numa_topology |
data structure representing the numa topology
numa interleave mask for allocations
1.8.11