Skip to content

NUMA

include/mem/numa.h View source View on GitHub
struct numa_node (8 fields) source
§ struct topology_node *topo
§ uint64_t mem_base
§ uint64_t mem_size
§ uint64_t distances_cnt
§ uint8_t *distance
§ uint8_t *rel_dists

this is an array of node_id -> relative distance. the larger the number, the further away the node is, relatively speaking.

for example, if we are node 0, and node 3 is the 2nd farthest away node, our rel_dists[3] will be 2.

§ uint8_t *nodes_by_distance

The opposite of rel_dists. Index is the “closeness”, value is the node at that distance. Basically just zonelists

§ struct cpu_mask cpus
void numa_dump(void)
source
void numa_construct_relative_distances(struct numa_node *node)
source