Re: Is it possible to put spice channels into different threads?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Fri, Jun 12, 2020 at 12:57 PM 陈炤 <qishiyexu2@xxxxxxx> wrote:
Hi,

Spice-gtk is now using co-routine to handle different channel connections. When a channel is handling data, other channels would have to wait, rather than handling synchronously.  That would bring us following issues:
 1. If some less important channels (like usb channels) are transfering big data, important channels (main-channel, display-channel,input-channel) will be affected.  
 2. When receiving big data like file transfering(G_IO_IN), send event (G_IO_OUT) will not be triggered.
 3. Flow control between different channels will be hard to do. 

Is is possible(and make sense) to put channels into different threads so they can synchronously receive & send msg, without affect each other?


Switching to threads would be possible, but that wouldn't help in the situation you describe, as you are very likely bound on IO. Using several threads would actually create more problems to synchronize and schedule the different channels.

Io operations in coroutines are non-blocking, so they shouldn't affect other spice-gtk task. If you however observe a blocking CPU-task in some channel, this may affect the performance of other channels. But in general, except for video/image decoding which may be done in a separate thread, the client side doesn't do much work.

USB, clipboard and file sharing may use large amounts of data, and we rely on the glib source and kernel to prioritize channels: this isn't great in some cases and may receive improvements.


--
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]