This post discusses the AioContext lock removal in QEMU 9.0, scheduled for release in 2024. It delves into the evolution of QEMU from a single-threaded program to a multi-threaded one and highlights the issues that arose. The introduction of the Big QEMU Lock (BQL) and later the AioContext lock aimed to address these problems but resulted in deadlocks and race conditions. Paolo Bonzini’s insight led to the idea of replacing the AioContext lock with fine-grained locks, which ultimately led to its removal. This process required a significant effort from multiple individuals, but it lays the groundwork for further improvements in QEMU’s multi-threading capabilities.
http://blog.vmsplice.net/2024/01/qemu-aiocontext-removal-and-how-it-was.html