[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] RFC: running the user interface in a thread ...
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] RFC: running the user interface in a thread ... |
Date: |
Thu, 21 Jan 2016 10:05:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
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
- Re: [Qemu-devel] RFC: running the user interface in a thread ..., (continued)
Re: [Qemu-devel] RFC: running the user interface in a thread ..., Kevin Wolf, 2016/01/19
Re: [Qemu-devel] RFC: running the user interface in a thread ..., Daniel P. Berrange, 2016/01/19
Re: [Qemu-devel] RFC: running the user interface in a thread ..., Dave Airlie, 2016/01/21
Re: [Qemu-devel] RFC: running the user interface in a thread ..., Fam Zheng, 2016/01/21