DiSMEC++
anonymous_namespace{numa.cpp}::NodeData Class Reference

Public Member Functions

 NodeData (int id)
 
numa_node_id_t get_id () const
 
void add_cpu (cpu_id_t cpu_id)
 
bool empty () const
 
int num_threads () const
 
int max_load () const
 
cpu_id_t place_thread ()
 

Private Attributes

numa_node_id_t m_ID
 
std::vector< cpu_id_tm_CPUs
 Vector of CPU ids that are on this NUMA node. More...
 
std::vector< int > m_LoadIndicator
 How much work have we placed on that CPU. More...
 
int NumThreads = 0
 

Detailed Description

Definition at line 135 of file numa.cpp.

Constructor & Destructor Documentation

◆ NodeData()

anonymous_namespace{numa.cpp}::NodeData::NodeData ( int  id)
inlineexplicit

Definition at line 137 of file numa.cpp.

Member Function Documentation

◆ add_cpu()

void anonymous_namespace{numa.cpp}::NodeData::add_cpu ( cpu_id_t  cpu_id)
inline

Definition at line 144 of file numa.cpp.

◆ empty()

bool anonymous_namespace{numa.cpp}::NodeData::empty ( ) const
inline

Definition at line 149 of file numa.cpp.

◆ get_id()

numa_node_id_t anonymous_namespace{numa.cpp}::NodeData::get_id ( ) const
inline

Definition at line 140 of file numa.cpp.

◆ max_load()

int anonymous_namespace{numa.cpp}::NodeData::max_load ( ) const
inline

Definition at line 157 of file numa.cpp.

◆ num_threads()

int anonymous_namespace{numa.cpp}::NodeData::num_threads ( ) const
inline

Definition at line 153 of file numa.cpp.

◆ place_thread()

Member Data Documentation

◆ m_CPUs

std::vector<cpu_id_t> anonymous_namespace{numa.cpp}::NodeData::m_CPUs
private

Vector of CPU ids that are on this NUMA node.

Definition at line 187 of file numa.cpp.

◆ m_ID

numa_node_id_t anonymous_namespace{numa.cpp}::NodeData::m_ID
private

Definition at line 186 of file numa.cpp.

◆ m_LoadIndicator

std::vector<int> anonymous_namespace{numa.cpp}::NodeData::m_LoadIndicator
private

How much work have we placed on that CPU.

Currently uses the following heuristic: Placing a thread on the core increases the load by a value of 10, and increases the load of any core that is shared by hyperthreading by 5.

Definition at line 193 of file numa.cpp.

◆ NumThreads

int anonymous_namespace{numa.cpp}::NodeData::NumThreads = 0
private

Definition at line 195 of file numa.cpp.


The documentation for this class was generated from the following file: