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_windows.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_windows.h')
-rw-r--r-- | intern/cycles/util/util_windows.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/intern/cycles/util/util_windows.h b/intern/cycles/util/util_windows.h index 9b9268fed7a..bd1bc85adff 100644 --- a/intern/cycles/util/util_windows.h +++ b/intern/cycles/util/util_windows.h @@ -31,29 +31,6 @@ #include <windows.h> -CCL_NAMESPACE_BEGIN - -#if _WIN32_WINNT < 0x0601 -typedef WORD tGetActiveProcessorGroupCount(); -typedef DWORD tGetActiveProcessorCount(WORD GroupNumber); -typedef BOOL tSetThreadGroupAffinity(HANDLE hThread, - const GROUP_AFFINITY *GroupAffinity, - PGROUP_AFFINITY PreviousGroupAffinity); -typedef BOOL tGetProcessGroupAffinity(HANDLE hProcess, - PUSHORT GroupCount, - PUSHORT GroupArray); - -extern tGetActiveProcessorGroupCount *GetActiveProcessorGroupCount; -extern tGetActiveProcessorCount *GetActiveProcessorCount; -extern tSetThreadGroupAffinity *SetThreadGroupAffinity; -extern tGetProcessGroupAffinity *GetProcessGroupAffinity; -#endif - -/* Make sure NUMA and processor groups API is initialized. */ -void util_windows_init_numa_groups(); - -CCL_NAMESPACE_END - -#endif /* WIN32 */ +#endif /* _WIN32 */ #endif /* __UTIL_WINDOWS_H__ */ |