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