qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: running the user interface in a thread ...
@ 2016-01-18  9:54 Gerd Hoffmann
  2016-01-18 20:34 ` Eric Blake
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Gerd Hoffmann @ 2016-01-18  9:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Airlie, Marc-André Lureau

  Hi folks,

I'm starting to investigate if and how we can move the user interface
code into its own thread instead of running it in the iothread and
therefore avoid blocking the guest in case some UI actions take a little
longer.

opengl and toolkits tend to be bad at multithreading.  So my idea is to
have a single thread dedicated to all the UI + rendering stuff, possibly
let even the virglrenderer run in ui thread context.

I think we have to make that opt-in per user interface, so we can go
forward step by step.

The ui thread will need quite some stuff provided by the mainloop.  Wait
for all kinds of events (from vnc socket, x11 connection, ...).
Probably timers too.  Wait for events from other threads (guest screen
updates).

Suggestions how to tackle that?
Can I reuse the qemu mainloop code outside of the iothread?
Maybe it'll be better to go straight for a glib main loop?
Is it possible to wait for file handle events and posix condition
variables at the same time?

Other notes / hints / suggestions / ideas?

thanks,
  Gerd

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-01-22  7:14 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18  9:54 [Qemu-devel] RFC: running the user interface in a thread Gerd Hoffmann
2016-01-18 20:34 ` Eric Blake
2016-01-19 13:01   ` Gerd Hoffmann
2016-01-19 13:38     ` Dr. David Alan Gilbert
2016-01-19 14:14       ` Gerd Hoffmann
2016-01-20 14:33         ` Kevin Wolf
2016-01-19 15:19     ` Markus Armbruster
2016-01-19 15:28     ` Daniel P. Berrange
2016-01-20  5:05       ` Eric Blake
2016-01-20  8:45         ` Gerd Hoffmann
2016-01-19 12:51 ` Kevin Wolf
2016-01-21  9:58   ` Stefan Hajnoczi
2016-01-21 10:39     ` Gerd Hoffmann
2016-01-21 10:52       ` Paolo Bonzini
2016-01-21 10:40     ` Daniel P. Berrange
2016-01-19 15:37 ` Daniel P. Berrange
2016-01-20  7:13   ` Gerd Hoffmann
2016-01-21  8:44 ` Dave Airlie
2016-01-21  9:05   ` Paolo Bonzini
2016-01-21  9:52     ` Gerd Hoffmann
2016-01-21 10:16       ` Paolo Bonzini
2016-01-22  1:38     ` Dave Airlie
2016-01-22  6:59       ` Gerd Hoffmann
2016-01-22  7:14         ` Dave Airlie
2016-01-21  9:00 ` Fam Zheng
2016-01-21  9:45   ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).