On 2024/10/19 6:31, Dmitry Osipenko wrote:
On 10/18/24 08:28, Akihiko Odaki wrote:
+static void virgl_write_context_fence(void *opaque, uint32_t ctx_id,
+ uint32_t ring_idx, uint64_t fence)
+{
+ VirtIOGPU *g = opaque;
What about taking the BQL here instead of having a QEMUBH?
That will block virglrenderer thread writing the fence, which in turns
might block other virglrenderer threads.
Looking at virglrenderer's source code, the thread writing the fence is
the only thread it creates. Otherwise virglrenderer's code should be
executed only in the QEMU thread calling virglrenderer's functions,
which always holds the BQL. So taking the BQL here will not interfere
with another thread.