From: Paolo Bonzini <pbonzini@redhat.com>
To: Dave Airlie <airlied@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>
Cc: "David Airlie" <airlied@redhat.com>,
"Marc-André Lureau" <mlureau@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] RFC: running the user interface in a thread ...
Date: Thu, 21 Jan 2016 10:05:46 +0100 [thread overview]
Message-ID: <56A09F6A.2030609@redhat.com> (raw)
In-Reply-To: <CAPM=9twOeZW+h=ENrkTtn3N2Y-33-LWPS4SabHmXAxtpk+swew@mail.gmail.com>
On 21/01/2016 09:44, Dave Airlie wrote:
> I've hacked on this before, but only with SDL and it was pretty dirty,
> and it gave a fairly decent
> speed up.
>
> My thoughts are to use dataplane like design to process the queue in a
> separate thread,
> and then have some sort of channel between the UI and virtio-gpu
> thread to handle things like
> screen resize etc.
>
> http://cgit.freedesktop.org/~airlied/qemu/commit/?h=dave3d&id=fe22a0955255afef12b947c4a91efa57e7a7c429
> is my previous horror patch.
Instead of having a full-blown thread, are there things (such as the
TGSI->GLSL conversion) that could be simply offloaded to a userspace
thread pool, either in QEMU or in virglrenderer?
If you can do this in QEMU, as an alternative to writing code with
callbacks we have coroutines based on a setjmp-longjmp and also a simple
thread pool (thread-pool.c). If you want to allocate your own
thread-pool, you can create an additional AioContext (aio_context_new)
and add the AioContext to the glib main loop using aio_get_g_source.
Paolo
next prev parent reply other threads:[~2016-01-21 9:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A09F6A.2030609@redhat.com \
--to=pbonzini@redhat.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=kraxel@redhat.com \
--cc=mlureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.