Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pmbw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ void* thread_master(void* cookie)
int node_num = thread_num % g_numa_nodes;
int node_offset = thread_num / g_numa_nodes;
int threads_per_node_ceil = (g_nthreads + g_numa_nodes - 1) / g_numa_nodes;
// pin to numa node
numa_run_on_node(node_num);

const std::vector<int>& cpuset = g_numa_cpuset[node_num];
pin_self_to_core(cpuset[node_offset % cpuset.size()]);
Expand Down Expand Up @@ -709,6 +711,8 @@ void* thread_worker(void* cookie)
// set NUMA node for task and preferred allocation
int node_num = thread_num % g_numa_nodes;
int node_offset = thread_num / g_numa_nodes;
// pin to numa node
numa_run_on_node(node_num);

const std::vector<int>& cpuset = g_numa_cpuset[node_num];
pin_self_to_core(cpuset[node_offset % cpuset.size()]);
Expand Down Expand Up @@ -803,6 +807,8 @@ void* thread_filler(void* cookie)
int node_num = *((int*)cookie);
delete (int*)cookie;

numa_run_on_node(node_num);

double ts1 = timestamp();
memset(g_memarea[node_num], 1, g_memsize_node);
double ts2 = timestamp();
Expand Down