|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH 2/7] Enable I/O thread and VNC threads by default |
Date: | Tue, 08 Feb 2011 11:58:04 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10 |
On 02/08/2011 04:06 AM, Aurelien Jarno wrote:
Yes, it's slow. But is it a problem? You assume that people use QEMU only for emulating SMP platforms. This is a wrong assumption. Beside the x86 target, only sparc really supports SMP emulation.
It's *not* just about performance.TCG requires a signal to break out of a tight chained TB loop. If you have a guest in a tight loop waiting for something external (like polling on a in-memory flag), the device emulation will not get to run until a signal is fired.
Unless you set SIGIO on every file descriptor that selects polls on (and you can't because there are a number that just don't support SIGIO), then you have a race condition.
This can be fixed by running TCG in a separate thread than select() and sending a signal to the TCG VCPU when select() returns (effectively SIGIO in userspace).
This is exactly what the I/O thread does. Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |