Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   numa    ( 3 )

библиотека политик NUMA (NUMA policy library)

Синопсис (Synopsis)

#include <numa.h>

cc ... -lnuma

int numa_available(void);

int numa_max_possible_node(void); int numa_num_possible_nodes();

int numa_max_node(void); int numa_num_configured_nodes(); struct bitmask *numa_get_mems_allowed(void);

int numa_num_configured_cpus(void); struct bitmask *numa_all_nodes_ptr; struct bitmask *numa_no_nodes_ptr; struct bitmask *numa_all_cpus_ptr;

int numa_num_task_cpus(); int numa_num_task_nodes();

int numa_parse_bitmap(char *line , struct bitmask *mask); struct bitmask *numa_parse_nodestring(const char *string); struct bitmask *numa_parse_nodestring_all(const char *string); struct bitmask *numa_parse_cpustring(const char *string); struct bitmask *numa_parse_cpustring_all(const char *string);

long long numa_node_size(int node, long long*freep); long long numa_node_size64(int node, long long *freep);

int numa_preferred(void); void numa_set_preferred(int node); int numa_get_interleave_node(void); struct bitmask *numa_get_interleave_mask(void); void numa_set_interleave_mask(struct bitmask *nodemask); void numa_interleave_memory(void *start, size_t size, struct bitmask *nodemask); void numa_bind(struct bitmask *nodemask); void numa_set_localalloc(void); void numa_set_membind(struct bitmask *nodemask); void numa_set_membind_balancing(struct bitmask *nodemask); struct bitmask *numa_get_membind(void);

void *numa_alloc_onnode(size_t size, int node); void *numa_alloc_local(size_t size); void *numa_alloc_interleaved(size_t size); void *numa_alloc_interleaved_subset(size_t size, struct bitmask *nodemask); void *numa_alloc(size_t size); void *numa_realloc(void *old_addr, size_t old_size, size_t new_size); void numa_free(void *start, size_t size);

int numa_run_on_node(int node); int numa_run_on_node_mask(struct bitmask *nodemask); int numa_run_on_node_mask_all(struct bitmask *nodemask); struct bitmask *numa_get_run_node_mask(void);

void numa_tonode_memory(void *start, size_t size, int node); void numa_tonodemask_memory(void *start, size_t size, struct bitmask *nodemask); void numa_setlocal_memory(void *start, size_t size); void numa_police_memory(void *start, size_t size); void numa_set_bind_policy(int strict); void numa_set_strict(int strict);

int numa_distance(int node1, int node2);

int numa_sched_getaffinity(pid_t pid, struct bitmask *mask); int numa_sched_setaffinity(pid_t pid, struct bitmask *mask); int numa_node_to_cpus(int node, struct bitmask *mask); void numa_node_to_cpu_update(); int numa_node_of_cpu(int cpu);

struct bitmask *numa_allocate_cpumask();

void numa_free_cpumask(); struct bitmask *numa_allocate_nodemask();

void numa_free_nodemask(); struct bitmask *numa_bitmask_alloc(unsigned int n); struct bitmask *numa_bitmask_clearall(struct bitmask *bmp); struct bitmask *numa_bitmask_clearbit(struct bitmask *bmp, unsigned int n); int numa_bitmask_equal(const struct bitmask *bmp1, const struct bitmask *bmp2); void numa_bitmask_free(struct bitmask *bmp); int numa_bitmask_isbitset(const struct bitmask *bmp, unsigned int n); unsigned int numa_bitmask_nbytes(struct bitmask *bmp); struct bitmask *numa_bitmask_setall(struct bitmask *bmp); struct bitmask *numa_bitmask_setbit(struct bitmask *bmp, unsigned int n); void copy_bitmask_to_nodemask(struct bitmask *bmp, nodemask_t *nodemask) void copy_nodemask_to_bitmask(nodemask_t *nodemask, struct bitmask *bmp) void copy_bitmask_to_bitmask(struct bitmask *bmpfrom, struct bitmask *bmpto) unsigned int numa_bitmask_weight(const struct bitmask *bmp )

int numa_move_pages(int pid, unsigned long count, void **pages, const int *nodes, int *status, int flags); int numa_migrate_pages(int pid, struct bitmask *fromnodes, struct bitmask *tonodes);

void numa_error(char *where);

extern int numa_exit_on_error; extern int numa_exit_on_warn; void numa_warn(int number, char *where, ...);