diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-27 20:21:43 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-28 16:41:22 +0300 |
commit | ce927e15e0e3570a02834b6001519a024ca1e2b6 (patch) | |
tree | 0a11c6b8eabe4f42999844cebd0eba941fa66765 /source/blender/blenlib/BLI_threads.h | |
parent | b3e2c6941620773ccfba833f9945e2fce5169bb7 (diff) |
Tweaks for threading schedule for Threadripper2 and EPYC
The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).
We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.
One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 81f8445783b..631a65ccade 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -204,6 +204,12 @@ void BLI_thread_queue_nowait(ThreadQueue *queue); # define BLI_thread_local_set(name, value) name = value #endif /* defined(__APPLE__) */ +/* **** Special functions to help performance on crazy NUMA setups. **** */ + +/* Make sure process/thread is using NUMA node with fast memory access. */ +void BLI_thread_put_process_on_fast_node(void); +void BLI_thread_put_thread_on_fast_node(void); + #ifdef __cplusplus } #endif |