Processor Delays with Locking in multi-core VMs

Processor Delays with Locking in multi-core VMs

Hi all,

In our hypervisor implementation, we can have multiple cores assigned to a single VM.  In the multi-core VM configuration, we are seeing longer delays under virtualization for cores getting locks (even when there is no contention for the lock cell).

If a core (or thread) has a guest cache line resident and takes a VMEXIT for some reason and another core want to get ownership of the guest cache line (for atomic operation), does the 2nd core have to wait for the VMRESUME on the first core before getting ownership?

Are there any other reasons that would prevent a core from completing an atomic operation if other cores are in a VMEXIT condition?

Core1 has cache line A

Core1 takes a VMEXIT for timer interrupt

Core2 tries a sync_fetch_and_add to cache line A    <-- get ownership here

Core1 does a VMRESUME                                     <-- or wait till here for ownership

Thanks for any insight.


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Penny,
Here is a feedback from my colleague:
"There is nothing related to VMEXIT that would prevent normal cache snoop and response; so, no, the requester would not be delayed from getting ownership of the line."


Leave a Comment

Please sign in to add a comment. Not a member? Join today