diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-27 21:01:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-27 21:12:59 +0300 |
commit | 826d7adde79216d271b78059c05abd10b7559899 (patch) | |
tree | 5d8b334bf5603208e12b579e5a6cd1314d29cfdd /intern/cycles/util/util_thread.h | |
parent | de14ddf3a141cb0e2baff00b06dc7d86d3088916 (diff) |
Fix T59874: Cycles CPU 25% load only during rendering
The issue was introduced by a Threadripper2 commit back in
ce927e15e0e3. This boils down to threads inheriting affinity
from the parent thread. It is a question how this slipped
through the review (we definitely run benchmark round).
Quick fix could have been to always set CPU group affinity
in Cycles, and it would work for Windows. On other platforms
we did not have CPU groups API finished.
Ended up making Cycles aware of NUMA topology, so now we
bound threads to a specific NUMA node. This required adding
an external dependency to Cycles, but made some code there
shorter.
Diffstat (limited to 'intern/cycles/util/util_thread.h')
-rw-r--r-- | intern/cycles/util/util_thread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h index 6250bb95dcf..d54199a37fc 100644 --- a/intern/cycles/util/util_thread.h +++ b/intern/cycles/util/util_thread.h @@ -46,7 +46,7 @@ typedef std::condition_variable thread_condition_variable; class thread { public: - thread(function<void()> run_cb, int group = -1); + thread(function<void()> run_cb, int node = -1); ~thread(); static void *run(void *arg); @@ -56,7 +56,7 @@ protected: function<void()> run_cb_; std::thread thread_; bool joined_; - int group_; + int node_; }; /* Own wrapper around pthread's spin lock to make it's use easier. */ |