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.
This commit is contained in:
Sergey Sharybin
2018-11-27 18:21:43 +01:00
parent b3e2c69416
commit ce927e15e0
5 changed files with 111 additions and 0 deletions

View File

@@ -52,6 +52,7 @@
#include "BLI_callbacks.h"
#include "BLI_string.h"
#include "BLI_system.h"
#include "BLI_threads.h"
/* mostly init functions */
#include "BKE_appdir.h"
@@ -364,6 +365,7 @@ int main(
BKE_appdir_program_path_init(argv[0]);
BLI_threadapi_init();
BLI_thread_put_process_on_fast_node();
DNA_sdna_current_init();