QEMU Internals: Big picture overview

Posted by dba477 on Oct 4, 2020 12:39 PM EDT
http://blog.vmsplice.net; By Stefan Hajnoczi
Mail this story
Print this story

I believe that this article is worth reading even in meantime as well as another one been written by the same author "QEMU Internals: Overall architecture and threading model"

The newer architecture is one QEMU thread per vcpu plus a dedicated event loop thread. This model is known as iothread or CONFIG_IOTHREAD and can be enabled with ./configure --enable-io-thread at build time. Each vcpu thread can execute guest code in parallel, offering true SMP support, while the iothread runs the event loop. The rule that core QEMU code never runs simultaneously is maintained through a global mutex that synchronizes core QEMU code across the vcpus and iothread. Most of the time vcpus will be executing guest code and do not need to hold the global mutex. Most of the time the iothread is blocked in select(2) and does not need to hold the global mutex.

Note that TCG is not thread-safe so even under the iothread model it multiplexes vcpus across a single QEMU thread. Only KVM can take advantage of per-vcpu threads.

Full Story

  Nav
» Read more about: Story Type: Reviews, Tutorial

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.