Skip to content

Commit

Permalink
Numa fix (#125)
Browse files Browse the repository at this point in the history
* Fix cpuinfo names for Arm CPUs

* Fix a bug leading to segfaults from previous commit for the arm

* fix to choose appropriate NUMA nodes in RMM memory pool
  • Loading branch information
abagusetty authored Jun 6, 2024
1 parent 2863f9e commit 7c66576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tamm/rmm_memory_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class RMMMemoryManager {
EXPECTS_STR((numa_available() != -1), "[TAMM ERROR]: numa APIs are not available!");

numa_set_bind_policy(1);
numa_set_strict(1);
unsigned numNumaNodes = numa_num_task_nodes();

// for ranks_pn_=1, there is no need to check the mapping to numa-nodes (mostly used for CI)
Expand All @@ -208,7 +209,7 @@ class RMMMemoryManager {
struct bitmask* numaNodes = numa_get_mems_allowed();
numa_bind(numaNodes);

int numa_id = numa_preferred();
int numa_id = numa_node_of_cpu(sched_getcpu());
long numa_total_size = numa_node_size(numa_id, &max_host_bytes);
max_host_bytes *= 0.40; // reserve 40% only of the free numa-node memory (reserving rest of
// GA, non-pool allocations)
Expand Down

0 comments on commit 7c66576

Please sign in to comment.