[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] Enabling vm_event for a guest with more VCPUs than available ring buffer slots freezes the virtual machine
On Tue, Feb 7, 2017 at 3:09 PM, Mihai Donțu <mihai.dontu@xxxxxxxxx> wrote:
On Tue, 7 Feb 2017 22:41:57 +0200 Razvan Cojocaru wrote:
I was also looking at this but that's not the case. The function __vm_event_claim_slot will eventually trickle down to vm_event_grab_slot, which does have a lock. While holding the lock it calls vm_event_ring_available which returns how many free spots are on the ring (number of items the ring can hold - ved->target_producers - ved->foreign_producers). So if it returns 1 it will be grabbed, and either ved->target_producers or ved->foreign_producers gets incremented, and only then we unlock. The next caller to vm_event_grab_slot will not find a free spot. If that happens the caller to __vm_event_claim_slot will either gets put on the waitqueue (if sleeping_allowed is set) or returns -EBUSY (if losing the event is permissible).
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
Lists.xenproject.org is hosted with RackSpace, monitoring our