Speaker
Description
A task running in a vCPU may be holding a spinlock when it gets preempted by the host scheduler. Other tasks running in other vCPUs may now be blocked on that spinlock, wasting CPU time.
At IBM, we observed that under overcommit, this manifests as directed yield storms and long spinlock wait times which people have tried to mitigate in many different ways including adjusting scheduler tunables and penalizing spinner vCPUs, but with limited success. On s390 directed yield has time donation semantics. The proxy execution mechanism is therefore a good fit for us, so we have been working over the past few months to integrate it with KVM.
The blocked-on relationship that drives proxy execution today is expressed in terms of mutexes and their owners. We have experimented with interpreting this more broadly to cover guest spinlocks. Combined with the recently introduced donor migration approach, this allowed us to donate spin-wait time to a spinlock holder running on a different runqueue.
This talk will present the current state of development, integration challenges, initial performance results, and future work such as support for other architectures and upstreaming.