QEMU Automated Testing (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...)
----- Original Message ----
From: Jan Marten Simons <[email protected]>
To: [email protected]
Sent: Friday, July 27, 2007 12:50:51 PM
Subject: Re: QEMU Automated Testing (was [Qemu-devel] qemu Makefile.target vl.h hw/acpi.c hw/adlib.c ...)
Quoted 19 lines · Sunil Amitkumar Janki
Quoted 2 lines · Dan Shearer
You do also have the architectures provided to you by QEMU :-) :-)
I have been able to build modular Xorg for Armedslack in QEMU without having the hardware but when I tried to port Slackware 12.0 to SPARC in QEMU I found it was way too slow and started looking for some real hardware.
Maybe in the future where we have all kinds of cheap multicore processors this will not matter much but for the moment limited resources are still some
kind of hindrance to realizing the benefits of multi-architecture emulation.Maybe I should trade in my single-core Athlon system for some serious quadcore
x86_64chip but I'd rather wait for 16-core Loongson 3 :-).
Quoted 6 lines
As Qemu cannot use multicore CPUs (partially due to missing thread safety), yet, you won't benefit from this unless you want to run multiple instances of Qemu in parallel.
regs,
Jan
how close is thread safey?
Quoted 5 lines
Quoted 3 lines
As Qemu cannot use multicore CPUs (partially due to missing thread safety), yet, you won't benefit from this unless you want to run multiple instances of Qemu in parallel.
how close is thread safey?
In a useful form: a fair way off.
It's relatively simple to hack something together than runs. Making it work correctly and go fast is much harder though. My current prototype (running on 2 cores) runs about a quarter the speed of normal qemu, and dies shortly after booting because the guest atomic synchronisation primitives don't work right.
Either way, for a tinderbox or automated testing yo *do* have lots of different tests you can run in parallel, so it doesn't matter that each qemu instance only uses one core. We're only talking about small SMP here - maybe 16 cores, but not thousands.
Paul
Quoted 11 lines · Paul Brook
Quoted 6 lines
Quoted 4 lines
As Qemu cannot use multicore CPUs (partially due to missing thread safety), yet, you won't benefit from this unless you want to run multiple instances of Qemu in parallel.
how close is thread safey?
In a useful form: a fair way off.
It's relatively simple to hack something together than runs. Making it work correctly and go fast is much harder though. My current prototype (running on 2 cores) runs about a quarter the speed of normal qemu, and dies shortly after booting because the guest atomic synchronisation primitives don't work right.
This later problem seems like the hardest to solve to me. Did you have any ideas here that don't involve hand coding the translation for atomic instructions?
Regards,
Anthony Liguori
Quoted 7 lines
Either way, for a tinderbox or automated testing yo *do* have lots of different tests you can run in parallel, so it doesn't matter that each qemu instance only uses one core. We're only talking about small SMP here - maybe 16 cores, but not thousands.
Paul
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
how close is thread safey?
In a useful form: a fair way off.
It's relatively simple to hack something together than runs. Making it work correctly and go fast is much harder though. My current prototype (running on 2 cores) runs about a quarter the speed of normal qemu, and dies shortly after booting because the guest atomic synchronisation primitives don't work right.
Quoted 3 lines
This later problem seems like the hardest to solve to me. Did you have any ideas here that don't involve hand coding the translation for atomic instructions?
Yes. I do exclusive access locking at the TLB level. i.e. creating a TLB entry for a writable page forces that page to be flushed from all the other CPU TLBs.
There's some wiggle room in the definition of a "writable" page. If other critera are met it should be sufficient to just do this exclusion for atomic accesses.
If necessary the same technique can be used to avoid write ordering and coherency problems without having to accurately map guest barriers onto the equivalent host operations. This is handy when most of the guest barriers are implicit, e.g. when emulating a strictly ordered guest on a weakly ordered host.
In theory this could be taken to extremes and used to split emulation of a single machine over multiple address spaces/nodes. In practice the contention on a normal SMP operating system is high enough that this is not practical.
Paul