libfoedus-core
FOEDUS Core Library
|
#include <stddef.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | nodemask_t |
struct | bitmask |
Macros | |
#define | LIBNUMA_API_VERSION 2 |
#define | NUMA_NUM_NODES 2048 |
Functions | |
int | numa_bitmask_isbitset (const struct bitmask *, unsigned int) |
struct bitmask * | numa_bitmask_setall (struct bitmask *) |
struct bitmask * | numa_bitmask_clearall (struct bitmask *) |
struct bitmask * | numa_bitmask_setbit (struct bitmask *, unsigned int) |
struct bitmask * | numa_bitmask_clearbit (struct bitmask *, unsigned int) |
unsigned int | numa_bitmask_nbytes (struct bitmask *) |
unsigned int | numa_bitmask_weight (const struct bitmask *) |
struct bitmask * | numa_bitmask_alloc (unsigned int) |
void | numa_bitmask_free (struct bitmask *) |
int | numa_bitmask_equal (const struct bitmask *, const struct bitmask *) |
void | copy_nodemask_to_bitmask (nodemask_t *, struct bitmask *) |
void | copy_bitmask_to_nodemask (struct bitmask *, nodemask_t *) |
void | copy_bitmask_to_bitmask (struct bitmask *, struct bitmask *) |
static void | nodemask_zero (nodemask_t *mask) |
static void | nodemask_zero_compat (nodemask_t *mask) |
static void | nodemask_set_compat (nodemask_t *mask, int node) |
static void | nodemask_clr_compat (nodemask_t *mask, int node) |
static int | nodemask_isset_compat (const nodemask_t *mask, int node) |
static int | nodemask_equal (const nodemask_t *a, const nodemask_t *b) |
static int | nodemask_equal_compat (const nodemask_t *a, const nodemask_t *b) |
int | numa_available (void) |
int | numa_max_node (void) |
int | numa_max_possible_node (void) |
int | numa_preferred (void) |
long long | numa_node_size64 (int node, long long *freep) |
long | numa_node_size (int node, long *freep) |
int | numa_pagesize (void) |
void | numa_bind (struct bitmask *nodes) |
void | numa_set_interleave_mask (struct bitmask *nodemask) |
struct bitmask * | numa_get_interleave_mask (void) |
struct bitmask * | numa_allocate_nodemask (void) |
static void | numa_free_nodemask (struct bitmask *b) |
void | numa_set_preferred (int node) |
void | numa_set_localalloc (void) |
void | numa_set_membind (struct bitmask *nodemask) |
struct bitmask * | numa_get_membind (void) |
struct bitmask * | numa_get_mems_allowed (void) |
int | numa_get_interleave_node (void) |
void * | numa_alloc_interleaved_subset (size_t size, struct bitmask *nodemask) |
void * | numa_alloc_interleaved (size_t size) |
void * | numa_alloc_onnode (size_t size, int node) |
void * | numa_alloc_local (size_t size) |
void * | numa_alloc (size_t size) |
void * | numa_realloc (void *old_addr, size_t old_size, size_t new_size) |
void | numa_free (void *mem, size_t size) |
void | numa_interleave_memory (void *mem, size_t size, struct bitmask *mask) |
void | numa_tonode_memory (void *start, size_t size, int node) |
void | numa_tonodemask_memory (void *mem, size_t size, struct bitmask *mask) |
void | numa_setlocal_memory (void *start, size_t size) |
void | numa_police_memory (void *start, size_t size) |
int | numa_run_on_node_mask (struct bitmask *mask) |
int | numa_run_on_node_mask_all (struct bitmask *mask) |
int | numa_run_on_node (int node) |
struct bitmask * | numa_get_run_node_mask (void) |
void | numa_set_bind_policy (int strict) |
void | numa_set_strict (int flag) |
int | numa_num_possible_nodes () |
int | numa_num_possible_cpus () |
int | numa_num_configured_nodes () |
int | numa_num_configured_cpus () |
int | numa_num_task_cpus () |
int | numa_num_thread_cpus () |
int | numa_num_task_nodes () |
int | numa_num_thread_nodes () |
struct bitmask * | numa_allocate_cpumask () |
static void | numa_free_cpumask (struct bitmask *b) |
int | numa_node_to_cpus (int, struct bitmask *) |
int | numa_node_of_cpu (int cpu) |
int | numa_distance (int node1, int node2) |
void | numa_error (char *where) |
void | numa_warn (int num, char *fmt,...) |
int | numa_migrate_pages (int pid, struct bitmask *from, struct bitmask *to) |
int | numa_move_pages (int pid, unsigned long count, void **pages, const int *nodes, int *status, int flags) |
int | numa_sched_getaffinity (pid_t, struct bitmask *) |
int | numa_sched_setaffinity (pid_t, struct bitmask *) |
struct bitmask * | numa_parse_nodestring (const char *) |
struct bitmask * | numa_parse_nodestring_all (const char *) |
struct bitmask * | numa_parse_cpustring (const char *) |
struct bitmask * | numa_parse_cpustring_all (const char *) |
static void | numa_set_interleave_mask_compat (nodemask_t *nodemask) |
static nodemask_t | numa_get_interleave_mask_compat () |
static void | numa_bind_compat (nodemask_t *mask) |
static void | numa_set_membind_compat (nodemask_t *mask) |
static nodemask_t | numa_get_membind_compat () |
static void * | numa_alloc_interleaved_subset_compat (size_t size, const nodemask_t *mask) |
static int | numa_run_on_node_mask_compat (const nodemask_t *mask) |
static nodemask_t | numa_get_run_node_mask_compat () |
static void | numa_interleave_memory_compat (void *mem, size_t size, const nodemask_t *mask) |
static void | numa_tonodemask_memory_compat (void *mem, size_t size, const nodemask_t *mask) |
static int | numa_sched_getaffinity_compat (pid_t pid, unsigned len, unsigned long *mask) |
static int | numa_sched_setaffinity_compat (pid_t pid, unsigned len, unsigned long *mask) |
static int | numa_node_to_cpus_compat (int node, unsigned long *buffer, int buffer_len) |
Variables | |
struct bitmask * | numa_all_nodes_ptr |
struct bitmask * | numa_nodes_ptr |
nodemask_t | numa_all_nodes |
struct bitmask * | numa_all_cpus_ptr |
struct bitmask * | numa_no_nodes_ptr |
nodemask_t | numa_no_nodes |
int | numa_exit_on_error |
int | numa_exit_on_warn |
struct nodemask_t |
struct bitmask |
#define NUMA_NUM_NODES 2048 |
Definition at line 33 of file numa.h.
Referenced by nodemask_isset_compat().
void copy_bitmask_to_nodemask | ( | struct bitmask * | , |
nodemask_t * | |||
) |
Referenced by numa_get_interleave_mask_compat(), numa_get_membind_compat(), and numa_get_run_node_mask_compat().
void copy_nodemask_to_bitmask | ( | nodemask_t * | , |
struct bitmask * | |||
) |
|
inlinestatic |
|
inlinestatic |
Definition at line 106 of file numa.h.
References bitmask::maskp, numa_bitmask_equal(), and bitmask::size.
|
inlinestatic |
Definition at line 119 of file numa.h.
References bitmask::maskp, numa_bitmask_equal(), and bitmask::size.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 66 of file numa.h.
References bitmask::maskp, numa_bitmask_clearall(), and bitmask::size.
|
inlinestatic |
Definition at line 75 of file numa.h.
References bitmask::maskp, numa_bitmask_clearall(), and bitmask::size.
void* numa_alloc | ( | size_t | size | ) |
void* numa_alloc_interleaved | ( | size_t | size | ) |
void* numa_alloc_interleaved_subset | ( | size_t | size, |
struct bitmask * | nodemask | ||
) |
|
inlinestatic |
Definition at line 385 of file numa.h.
References bitmask::maskp, numa_alloc_interleaved_subset(), and bitmask::size.
void* numa_alloc_local | ( | size_t | size | ) |
void* numa_alloc_onnode | ( | size_t | size, |
int | node | ||
) |
struct bitmask* numa_allocate_cpumask | ( | ) |
struct bitmask* numa_allocate_nodemask | ( | void | ) |
int numa_available | ( | void | ) |
Referenced by foedus::memory::AlignedMemory::alloc(), foedus::memory::get_numa_node_size(), foedus::memory::EngineMemory::initialize_once(), foedus::assorted::mod_numa_node(), foedus::thread::NumaThreadScope::NumaThreadScope(), foedus::memory::ScopedNumaPreferred::ScopedNumaPreferred(), foedus::thread::ThreadOptions::ThreadOptions(), and foedus::thread::NumaThreadScope::~NumaThreadScope().
void numa_bind | ( | struct bitmask * | nodes | ) |
|
inlinestatic |
Definition at line 355 of file numa.h.
References copy_nodemask_to_bitmask(), numa_allocate_nodemask(), numa_bind(), and numa_bitmask_free().
struct bitmask* numa_bitmask_alloc | ( | unsigned | int | ) |
Referenced by nodemask_zero(), and nodemask_zero_compat().
Referenced by nodemask_equal(), and nodemask_equal_compat().
void numa_bitmask_free | ( | struct bitmask * | ) |
Referenced by numa_bind_compat(), numa_free_cpumask(), numa_free_nodemask(), numa_get_interleave_mask_compat(), numa_get_membind_compat(), and numa_get_run_node_mask_compat().
int numa_bitmask_isbitset | ( | const struct bitmask * | , |
unsigned | int | ||
) |
unsigned int numa_bitmask_nbytes | ( | struct bitmask * | ) |
unsigned int numa_bitmask_weight | ( | const struct bitmask * | ) |
int numa_distance | ( | int | node1, |
int | node2 | ||
) |
void numa_error | ( | char * | where | ) |
void numa_free | ( | void * | mem, |
size_t | size | ||
) |
|
inlinestatic |
Definition at line 277 of file numa.h.
References numa_bitmask_free().
|
inlinestatic |
Definition at line 181 of file numa.h.
References numa_bitmask_free().
struct bitmask* numa_get_interleave_mask | ( | void | ) |
|
inlinestatic |
Definition at line 344 of file numa.h.
References copy_bitmask_to_nodemask(), numa_bitmask_free(), and numa_get_interleave_mask().
int numa_get_interleave_node | ( | void | ) |
struct bitmask* numa_get_membind | ( | void | ) |
|
inlinestatic |
Definition at line 374 of file numa.h.
References copy_bitmask_to_nodemask(), numa_bitmask_free(), and numa_get_membind().
struct bitmask* numa_get_mems_allowed | ( | void | ) |
struct bitmask* numa_get_run_node_mask | ( | void | ) |
|
inlinestatic |
Definition at line 404 of file numa.h.
References copy_bitmask_to_nodemask(), numa_bitmask_free(), and numa_get_run_node_mask().
void numa_interleave_memory | ( | void * | mem, |
size_t | size, | ||
struct bitmask * | mask | ||
) |
|
inlinestatic |
Definition at line 415 of file numa.h.
References bitmask::maskp, numa_interleave_memory(), and bitmask::size.
int numa_max_node | ( | void | ) |
int numa_max_possible_node | ( | void | ) |
int numa_move_pages | ( | int | pid, |
unsigned long | count, | ||
void ** | pages, | ||
const int * | nodes, | ||
int * | status, | ||
int | flags | ||
) |
int numa_node_of_cpu | ( | int | cpu | ) |
long numa_node_size | ( | int | node, |
long * | freep | ||
) |
long long numa_node_size64 | ( | int | node, |
long long * | freep | ||
) |
int numa_node_to_cpus | ( | int | , |
struct bitmask * | |||
) |
|
inlinestatic |
Definition at line 455 of file numa.h.
References bitmask::maskp, numa_node_to_cpus(), and bitmask::size.
int numa_num_configured_cpus | ( | ) |
Referenced by foedus::thread::ThreadOptions::ThreadOptions().
int numa_num_configured_nodes | ( | ) |
Referenced by foedus::assorted::mod_numa_node(), and foedus::thread::ThreadOptions::ThreadOptions().
int numa_num_possible_cpus | ( | ) |
int numa_num_possible_nodes | ( | ) |
int numa_num_task_cpus | ( | ) |
int numa_num_task_nodes | ( | ) |
int numa_num_thread_cpus | ( | ) |
int numa_num_thread_nodes | ( | ) |
int numa_pagesize | ( | void | ) |
struct bitmask* numa_parse_cpustring | ( | const char * | ) |
struct bitmask* numa_parse_cpustring_all | ( | const char * | ) |
struct bitmask* numa_parse_nodestring | ( | const char * | ) |
struct bitmask* numa_parse_nodestring_all | ( | const char * | ) |
void numa_police_memory | ( | void * | start, |
size_t | size | ||
) |
int numa_preferred | ( | void | ) |
Referenced by foedus::memory::AlignedMemory::alloc(), and foedus::memory::ScopedNumaPreferred::ScopedNumaPreferred().
void* numa_realloc | ( | void * | old_addr, |
size_t | old_size, | ||
size_t | new_size | ||
) |
int numa_run_on_node | ( | int | node | ) |
Referenced by foedus::thread::NumaThreadScope::NumaThreadScope().
int numa_run_on_node_mask | ( | struct bitmask * | mask | ) |
Referenced by numa_run_on_node_mask_compat(), and foedus::thread::NumaThreadScope::~NumaThreadScope().
int numa_run_on_node_mask_all | ( | struct bitmask * | mask | ) |
|
inlinestatic |
Definition at line 395 of file numa.h.
References bitmask::maskp, numa_run_on_node_mask(), and bitmask::size.
int numa_sched_getaffinity | ( | pid_t | , |
struct bitmask * | |||
) |
|
inlinestatic |
Definition at line 435 of file numa.h.
References bitmask::maskp, numa_sched_getaffinity(), and bitmask::size.
int numa_sched_setaffinity | ( | pid_t | , |
struct bitmask * | |||
) |
|
inlinestatic |
Definition at line 445 of file numa.h.
References bitmask::maskp, numa_sched_setaffinity(), and bitmask::size.
void numa_set_bind_policy | ( | int | strict | ) |
void numa_set_interleave_mask | ( | struct bitmask * | nodemask | ) |
|
inlinestatic |
Definition at line 335 of file numa.h.
References bitmask::maskp, numa_set_interleave_mask(), and bitmask::size.
void numa_set_localalloc | ( | void | ) |
Referenced by foedus::thread::NumaThreadScope::NumaThreadScope().
void numa_set_membind | ( | struct bitmask * | nodemask | ) |
|
inlinestatic |
Definition at line 365 of file numa.h.
References bitmask::maskp, numa_set_membind(), and bitmask::size.
void numa_set_preferred | ( | int | node | ) |
Referenced by foedus::memory::AlignedMemory::alloc(), foedus::memory::ScopedNumaPreferred::ScopedNumaPreferred(), and foedus::memory::ScopedNumaPreferred::~ScopedNumaPreferred().
void numa_set_strict | ( | int | flag | ) |
void numa_setlocal_memory | ( | void * | start, |
size_t | size | ||
) |
void numa_tonode_memory | ( | void * | start, |
size_t | size, | ||
int | node | ||
) |
void numa_tonodemask_memory | ( | void * | mem, |
size_t | size, | ||
struct bitmask * | mask | ||
) |
|
inlinestatic |
Definition at line 425 of file numa.h.
References bitmask::maskp, numa_tonodemask_memory(), and bitmask::size.
void numa_warn | ( | int | num, |
char * | fmt, | ||
... | |||
) |
struct bitmask* numa_all_cpus_ptr |
nodemask_t numa_all_nodes |
struct bitmask* numa_all_nodes_ptr |
Referenced by foedus::thread::NumaThreadScope::~NumaThreadScope().
int numa_exit_on_error |
int numa_exit_on_warn |
nodemask_t numa_no_nodes |
struct bitmask* numa_no_nodes_ptr |
struct bitmask* numa_nodes_ptr |