[Mesa-dev] [Mesa-stable] [PATCH] swr: Fix KNOB_MAX_WORKER_THREADS thread creation override.

Rowley, Timothy O timothy.o.rowley at intel.com
Wed Dec 13 16:09:09 UTC 2017


Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>>

On Dec 12, 2017, at 5:37 PM, Bruce Cherniak <bruce.cherniak at intel.com<mailto:bruce.cherniak at intel.com>> wrote:

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: <mesa-stable at lists.freedesktop.org<mailto:mesa-stable at lists.freedesktop.org>>
---
src/gallium/drivers/swr/rasterizer/core/threads.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index f4ddc21226..6242cb3fc7 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();
        }
    }

--
2.11.0

_______________________________________________
mesa-stable mailing list
mesa-stable at lists.freedesktop.org<mailto:mesa-stable at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/mesa-stable

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171213/32a56b0b/attachment.html>


More information about the mesa-dev mailing list