[Spice-devel] [spice v10 10/27] server: Make the RedDrawable refcount thread-safe

Christophe Fergeau cfergeau at redhat.com
Fri Mar 4 10:00:29 UTC 2016


On Thu, Mar 03, 2016 at 12:22:39PM -0500, Frediano Ziglio wrote:
> 
> No, Qemu must provide a thread safe release_resource.
> Two reasons:
> - release_resource is called from RedWorker which is a different
>   thread than Qemu or other users (it's just created inside spice-server);
> - I looked at Qemu code and there is a clear comment on this ;-) .

This is not how I understood this code when I looked at it, my
understanding was that it's fine that the resource release comes from a
different thread, but that it's expected to always come from the same
RedWorker thread (I assume for a given QXL device). I did not read it as
"this code is reentrant and can be called from any thread"

Looking at it again, the ring modification code in
interface_release_resource in hw/display/qxl.c do not look like
something that is thread-safe.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160304/d5ddd762/attachment.sig>


More information about the Spice-devel mailing list