diff options
author | Bruce Cherniak <[email protected]> | 2017-12-12 17:18:23 -0600 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-12-14 22:56:46 +0000 |
commit | 219d03127d5983a51441e60cf92e1c014c0b611c (patch) | |
tree | 950d8516b460285bb322c4c0c3e951395b989910 | |
parent | 8dee6d0063a1b6d7fce1efac2e578658ef92964d (diff) |
swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.
Environment variable KNOB_MAX_WORKER_THREADS allows the user to override
default thread creation and thread binding. Previous commit to adjust
linux cpu topology caused setting this KNOB to bind all threads to a single
core.
This patch restores correct functionality of override.
Cc: <[email protected]>
Reviewed-by: Tim Rowley <[email protected]>
(cherry picked from commit 709f5bdc4a2bf31f422f5cf60797224c0463c10a)
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/threads.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp index f4ddc212264..6242cb3fc7c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp @@ -213,8 +213,7 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread { for (auto &core : node.cores) { - out_numThreadsPerProcGroup = std::max((size_t)out_numThreadsPerProcGroup, - core.threadIds.size()); + out_numThreadsPerProcGroup += core.threadIds.size(); } } |