libfoedus-core
FOEDUS Core Library
foedus::thread::NumaThreadScope Struct Reference

Pin the current thread to the given NUMA node in this object's scope. More...

Detailed Description

Pin the current thread to the given NUMA node in this object's scope.

Declare this object as soon as the thread starts.

Definition at line 33 of file numa_thread_scope.hpp.

#include <numa_thread_scope.hpp>

Public Member Functions

 NumaThreadScope (int numa_node)
 
 ~NumaThreadScope ()
 

Constructor & Destructor Documentation

foedus::thread::NumaThreadScope::NumaThreadScope ( int  numa_node)
inlineexplicit

Definition at line 34 of file numa_thread_scope.hpp.

References foedus::assorted::mod_numa_node(), numa_available(), numa_run_on_node(), and numa_set_localalloc().

34  {
35  if (::numa_available() >= 0) {
36  numa_node = assorted::mod_numa_node(numa_node);
37  ::numa_run_on_node(numa_node);
39  }
40  }
int numa_run_on_node(int node)
int numa_available(void)
void numa_set_localalloc(void)
int mod_numa_node(int numa_node)
In order to run even on a non-numa machine or a machine with fewer sockets, we allow specifying arbit...

Here is the call graph for this function:

foedus::thread::NumaThreadScope::~NumaThreadScope ( )
inline

Definition at line 41 of file numa_thread_scope.hpp.

References numa_all_nodes_ptr, numa_available(), and numa_run_on_node_mask().

41  {
42  if (::numa_available() >= 0) {
44  }
45  }
struct bitmask * numa_all_nodes_ptr
int numa_available(void)
int numa_run_on_node_mask(struct bitmask *mask)

Here is the call graph for this function:


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