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

Marek Olšák maraeo at gmail.com
Wed Jun 22 22:29:30 UTC 2016


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.

Marek


More information about the mesa-dev mailing list