On 04/28/11 13:14, Alon Levy wrote:
On Thu, Apr 28, 2011 at 12:13:07PM +0200, Gerd Hoffmann wrote:
   Hi folks,

Here is a alternative approach to fix the qemu locking issue.  It simply
handles the updates in the display refresh timer instead of switching
back and forth between the threads using the pipe.

comments?

Looks good. I guess you are sure that the lock is less resource hungry then
switching threads?  Anyhow it's way less code, which is great.

Yes, the main point of doing it this way is to avoid thread context switches.

Beside that even the pipe version needs a lock for the update pointer variable (which is accessed in non-atomic ways from both iothread and spice-server thread context), i.e. it is buggy as-is. The race window is pretty small and probably hard to hit though, guess thats why no issues showed up so far in practice.

cheers,
  Gerd

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to