idle tasks starving in toytoolkit
Tomeu Vizoso
tomeu at tomeuvizoso.net
Thu Sep 26 07:59:13 PDT 2013
Hi,
somewhat related to the issue of posting vs. queuing buffer.release event
is a condition I have found that starves idle handlers in window.c.
If the SwapBuffers implementation waits for buffer.release events to make
sure that the GPU doesn't overwrite the front buffer and the client
performs its rendering on the frame callback (for example, the subsurface
example), the following happens:
1. window.c calls wl_display_dispatch, which in turn calls dispatch_queue
and eventually the client's frame callback handler
2. client executes GL commands
3. client registers a new frame callback
4. client calls SwapBuffers
5. in SwapBuffers, wl_display_dispatch_queue is called while waiting for
buffer.release
6. once buffer.release comes, a new frame event has been read from the fd
and placed in the main queue
7. control is returned to dispatch_queue which dispatches the new frame
event, going back to 2
Thus control never returns to the main loop and no other idle tasks are
ever ran.
To my untrained eyes, this seems more than just a bug in toytoolkit, so I
will love to hear any comments.
Thanks,
Tomeu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130926/d20af052/attachment.html>
More information about the wayland-devel
mailing list