Re: [Xen-devel] [PATCHv1 2/2] passthrough: improve locking when iterating over interrupts bound to VMs

2015-10-28 Thread Konrad Rzeszutek Wilk
On Fri, Oct 23, 2015 at 12:05:22PM +0100, David Vrabel wrote: > radix_tree_gang_lookup() only requires a RCU read lock, not the > per-domain event_lock. Don't you need to make some form of 'spin_lock_init' call? > > Introduce a new RCU read lock and take the per-interrupt lock before > calling

Re: [Xen-devel] [PATCHv1 2/2] passthrough: improve locking when iterating over interrupts bound to VMs

2015-10-27 Thread David Vrabel
On 27/10/15 12:44, Jan Beulich wrote: On 23.10.15 at 13:05, wrote: >> radix_tree_gang_lookup() only requires a RCU read lock, not the >> per-domain event_lock. > > ... when not caring about a consistent snapshot. > >> @@ -678,9 +684,7 @@ void

Re: [Xen-devel] [PATCHv1 2/2] passthrough: improve locking when iterating over interrupts bound to VMs

2015-10-27 Thread Jan Beulich
>>> On 23.10.15 at 13:05, wrote: > radix_tree_gang_lookup() only requires a RCU read lock, not the > per-domain event_lock. ... when not caring about a consistent snapshot. > @@ -678,9 +684,7 @@ void hvm_dpci_msi_eoi(struct domain *d, int vector) > if (

[Xen-devel] [PATCHv1 2/2] passthrough: improve locking when iterating over interrupts bound to VMs

2015-10-23 Thread David Vrabel
radix_tree_gang_lookup() only requires a RCU read lock, not the per-domain event_lock. Introduce a new RCU read lock and take the per-interrupt lock before calling the callback instead. This eliminates all contention on the event_lock when injecting interrupts from passthrough devices.