On 13 March 2013 09:32, 解壁伟 <xiebi...@ict.ac.cn> wrote: > I read the article again, and I get the answer to my question in that > paragraph. > Thank you very much. > As you've said, TCG's not thread-safe. > Is it only the shared data structure(e.g TB) that prevent TCG to be > thread-safe? I'm seeking a method to parallize TCG in order to parallize > Qemu.
Yes, the major problem is the non-thread-safe code generation data structures. (I fixed one set of non-threadsafe code recently but there are still a lot to do. Needs thought about the right design principles.) > For now, I need a emulator to emulate more cores efficiently.I want to > analyze whether Qemu can be faster when it emulate more cores, while > parallelism maybe a good choice. There has been some other research work with QEMU in this area, you should probably look it up. However it has all been "we fixed enough of the big problems to be able to run some benchmarks and write our research paper", so none of this is actually in the QEMU sources. (The short answer I think is "probably but it will depend a lot on workload, and there's a lot of software engineering required to do it reliably".) -- PMM