[Mesa-dev] [PATCH 2/2] st/clover: Always flush the queue when waiting on an hard_event

Francisco Jerez currojerez at riseup.net
Sun Oct 6 12:41:20 PDT 2013


Niels Ole Salscheider <niels_ole at salscheider-online.de> writes:

> Am Donnerstag, 3. Oktober 2013, 11:08:26 schrieb Francisco Jerez:
>> Niels Ole Salscheider <niels_ole at salscheider-online.de> writes:
>> >> Do you have any example of a real world application that relies on this?
>> >> Or at least some reasonable use case?
>> > 
>> > The problem is that the queue is only cleared from already signalled
>> > events
>> > when we flush it. And we might not do this if the user only calls
>> > clWaitForEvents once the corresponding event has already been signalled.
>> > 
>> > I am fine with not flushing the queue, but we should at least make sure
>> > that signalled events are freed early enough.
>
>> So your application doesn't call clFlush() explicitly nor any blocking
>> call on that specific event and it stalls forever polling an event with
>> clGetEventInfo() that never gets flushed to the GPU?  Is that the
>> problem you've seen?  Is it an open source application?
>
> Unfortunately, the application is not open source and I am not allowed to give 
> the code to someone else, even though I have access to it.
>
> The application calls clFinish and clWaitForEvents, but not clFlush. I think 
> the problem is that the kernels might already have finished execution when the 
> application calls these functions. Because of that the queue is not flushed and 
> thus not cleared.

That's very unlikely...  Kernels cannot ever start execution until the
command queue is flushed to the hardware.

> However, I cannot reproduce it right now.
>

What are the exact symptoms you are getting?  Maybe an ltrace [1] of the
CL API functions that your program calls would help us get a better
understanding of the problem?

Thanks.

[1] http://ltrace.org/

> Regards,
>
> Ole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131006/2a1d5054/attachment.pgp>


More information about the mesa-dev mailing list