Software Archive
Read-only legacy content
17060 Discussions

Processor Delays with Locking in multi-core VMs

Penny_Svenkeson
Beginner
266 Views

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.

Penny

0 Kudos
1 Reply
Quoc-Thai_L_Intel
266 Views

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."
-Thai

 

0 Kudos
Reply