[Mesa-dev] [PATCH 0/6] Gallium multithreaded queue - cleanup and multiple threads per queue

Nicolai Hähnle nhaehnle at gmail.com
Fri Jun 24 07:40:13 UTC 2016


On 23.06.2016 00:35, Marek Olšák wrote:
> On Thu, Jun 23, 2016 at 12:29 AM, Marek Olšák <maraeo at gmail.com> wrote:
>> On Tue, Jun 21, 2016 at 4:47 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>>> On 21.06.2016 14:17, Marek Olšák wrote:
>>>>
>>>> Hi,
>>>>
>>>> This improves u_queue to be more usable in more cases.
>>>>
>>>> With this, the size of the queue (maximum number of jobs waiting) is
>>>> configurable as well as the number of threads executing the jobs. The
>>>> semaphores are ditched in favor of simpler condvars, and multiple waiters on
>>>> fences are allowed as well.
>>>>
>>>> This is a prerequisite for a later series that will add multithreaded
>>>> shader compilation into radeonsi.
>>>
>>>
>>> I like the overall cleanup, but I'd appreciate it if you could rearrange
>>> patch #3 and #5 a little to avoid the temporary deadlock. No need to risk
>>> someone running into that while bisecting.
>>>
>>> I think it would suffice to add queue->lock locking around the
>>> queue->kill_threads already in patch #3, but tbh I'd also be fine with the
>>> slightly less-work option of squashing the two patches together.
>>
>> To be honest, I'm not able to see the deadlock now. Maybe I should
>> remove the comment.
>>
>> Strictly speaking, patch 3 doesn't change anything with respect to
>> locking. Either the deadlock is not there or it has always been there.
>
> If I fix up calloc, free, and snprintf, does it have your Rb?

Yes, go ahead.

Nicolai

> Marek
>


More information about the mesa-dev mailing list