diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-06-11 11:07:14 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-06-17 14:52:45 +0100 |
commit | 498ed2664219f7e8f1077f46ad2061aba2f57de4 (patch) | |
tree | 123f66f55096876114b89876e4adf287ad944818 /rts/Capability.h | |
parent | a7f65b8787b0521397ee09061394425aa69bc6e0 (diff) | |
download | haskell-498ed2664219f7e8f1077f46ad2061aba2f57de4.tar.gz |
NUMA cleanups
- Move the numaMap and nNumaNodes out of RtsFlags to Capability.c
- Add a test to tests/rts
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index 6874379c5f..67b43280eb 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -39,7 +39,7 @@ struct Capability_ { // The NUMA node on which this capability resides. This is used to allocate // node-local memory in allocate(). // - // Note: this is always equal to cap->no % RtsFlags.ParFlags.nNumaNodes. + // Note: this is always equal to cap->no % n_numa_nodes. // The reason we slice it this way is that if we add or remove capabilities // via setNumCapabilities(), then we keep the number of capabilities on each // NUMA node balanced. @@ -159,9 +159,6 @@ struct Capability_ { #endif ; - -#define capNoToNumaNode(n) ((n) % RtsFlags.GcFlags.nNumaNodes) - #if defined(THREADED_RTS) #define ASSERT_TASK_ID(task) ASSERT(task->id == osThreadId()) #else @@ -350,6 +347,18 @@ void markCapabilities (evac_fn evac, void *user); void traverseSparkQueues (evac_fn evac, void *user); /* ----------------------------------------------------------------------------- + NUMA + -------------------------------------------------------------------------- */ + +/* Number of logical NUMA nodes */ +extern uint32_t n_numa_nodes; + +/* Map logical NUMA node to OS node numbers */ +extern uint32_t numa_map[MAX_NUMA_NODES]; + +#define capNoToNumaNode(n) ((n) % n_numa_nodes) + +/* ----------------------------------------------------------------------------- Messages -------------------------------------------------------------------------- */ |