3 ms·
Multi-threaded emulation for QEMU
- 0xcde4c3db 10y agoFor some reason I thought the reason that this hadn't been implemented already was that Sony had patents on multithreaded binary translation. I guess those might have only applied to specific techniques for heterogeneous or ring-bus systems (i.e. Cell), though.
- pm215 10y agoNo, it's just that it's the kind of feature that's quite hard to retrofit to an existing design, since it breaks existing assumptions in a lot of places. And it's only relatively recently that the kind of embedded board that you usually want to emulate with QEMU has had a multi-core CPU.
- webaholic 10y agoThis has recently landed in upstream qemu and will be available with the 2.9 release.
- bonzini 10y agoSome bugs are being found that affect single-vCPU emulation. There's still a possibility that it will be reverted before the release.
- compsciphd 10y agodoes this mean one could run (without hardware support, say in aws) smp virtualization? i.e. linux on linux or windows on linux (why not just spawn another machine? because you want to have more control than what aws provides)
- webaholic 10y agoThis allows you to create one host thread per guest vcpu, so yes, you can run a smp guest on aws. But, it will be pretty slow compared to KVM, since the execution of the threads is limited by the host cpu resources and the fact that you are using translation and full system emulation.
- compsciphd 10y agoso I guess that means QEMU always does full translation instead of just translating the privileged ops? (ala what vmware's innovation back in the day was)
- dfox 10y agoIt means that you can run SMP guest on SMP system and use more than one host core for that. You could run SMP guests before, but they were limited to only one host thread.
- bonzini 10y agoHere is a paper from last month's CGO2017 conference, explaining the techniques more in detail: http://www.cs.columbia.edu/~cota/pubs/cota_cgo17.pdf http://www.cs.columbia.edu/~cota/pubs/cota_cgo17.pdf