From 76608f5ec5e9737c7ef680a2234b8e3347b61c7b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 5 Mar 2019 12:43:40 +0100 Subject: Fix T60585: threadripper CPU only using 16 threads for e.g. sculpting. This reverts the changes from ce927e1 to put the main and job threads on node 0. The problem is that all threads created as children from these threads will inherit the NUMA node and so will end up on the same node. This can be fixed case-by-case by assigning the NUMA node for every child thread, however this is difficult for external libraries and OpenMP, and out of our control for plugins like external renderers. --- source/blender/blenlib/intern/threads.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 341b97edbf6..d1aa3232173 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -888,7 +888,7 @@ static void threadripper_put_process_on_fast_node(void) if (!is_numa_available) { return; } - /* NOTE: Technically, we can use NUMA nodes 0 and 2 and usning both of + /* NOTE: Technically, we can use NUMA nodes 0 and 2 and using both of * them in the affinity mask will allow OS to schedule threads more * flexible,possibly increasing overall performance when multiple apps * are crunching numbers. @@ -923,14 +923,26 @@ static void threadripper_put_thread_on_fast_node(void) void BLI_thread_put_process_on_fast_node(void) { + /* Disabled for now since this causes only 16 threads to be used on a + * threadripper for computations like sculpting and fluid sim. The problem + * is that all threads created as children from this thread will inherit + * the NUMA node and so will end up on the same node. This can be fixed + * case-by-case by assigning the NUMA node for every child thread, however + * this is difficult for external libraries and OpenMP, and out of our + * control for plugins like external renderers. */ +#if 0 if (check_is_threadripper2_alike_topology()) { threadripper_put_process_on_fast_node(); } +#endif } void BLI_thread_put_thread_on_fast_node(void) { + /* Disabled for now, see comment above. */ +#if 0 if (check_is_threadripper2_alike_topology()) { threadripper_put_thread_on_fast_node(); } +#endif } -- cgit v1.2.3