commit | f8305e781fb18795bd6113683c19ee1cc26c3e5c | [log] [tgz] |
---|---|---|
author | David Brazdil <dbrazdil@google.com> | Fri Sep 27 13:17:52 2019 +0000 |
committer | David Brazdil <dbrazdil@google.com> | Wed Oct 16 11:50:25 2019 +0100 |
tree | 500123257432cbdad469d6796a4e9e65b554b021 | |
parent | 3cc24aa81d5fa2681bab920128f1173e54f8dfd8 [diff] |
Revert^2: Improve spinlock implementation for ARMv8.0 Current implementation of spinlocks using C11 atomics compiles into an LDAXR/STXR pair which we observe does not always make forward progress on Cortex A72 (concurrent_save_restore test livelocks). This patch inserts a WFE instruction when the LDAXR returns that the lock is currently taken, pausing the thread until an event is triggered and easing off the contention. This is observed to help forward progress on A72 and should also improve power consumption of our spinlocks. Note that there is still no guarantee of forward progress and threads can be shown to livelock on the A72 if the loops are extremely tight. This should be revisited in the future, possibly by leveraging ARMv8.1 LSE atomics. This reverts commit c4dfdb789421c7658ce59e24eb60cda38335c2f2. Test: vcpu_state.concurrent_save_restore Bug: 141087046 Change-Id: I0435632e4994e74457102ae7133bf77b47c0283f
Hafnium is a hypervisor, initially supporting aarch64 (64-bit ARMv8 CPUs).
Get in touch and keep up-to-date at hafnium-discuss@googlegroups.com.
To jump in and build Hafnium, follow the getting started instructions.
If you want to contribute to the project, see details of how we accept contributions.
More documentation is available on: