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

Cherniak, Bruce bruce.cherniak at intel.com
Mon Dec 18 00:28:22 UTC 2017


> On Dec 17, 2017, at 10:23 AM, Andres Gomez <agomez at igalia.com> wrote:
> 
> Bruce, this depends on ead0dfe31ec7 which didn't make it for the 17.2
> queue so I will be leaving out from there.

Hi Andres, it is fine to leave out for 17.2, that branch is fine.

We would like this in 17.3 stable, however.  17.3.0 contains the bug.

Apologies for any confusion.

Bruce

> Let me know what you think.
> 
> On Tue, 2017-12-12 at 17:37 -0600, Bruce Cherniak 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>
>> ---
>> 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();
>>         }
>>     }
>> 
> -- 
> Br,
> 
> Andres



More information about the mesa-dev mailing list