Re: [Xen-devel] [PATCHv9 1/4] gnttab: per-active entry locking

2015-05-21 Thread David Vrabel
On 21/05/15 08:46, Jan Beulich wrote: On 20.05.15 at 17:54, wrote: >> @@ -702,6 +729,7 @@ __gnttab_map_grant_ref( >> >> cache_flags = (shah->flags & (GTF_PAT | GTF_PWT | GTF_PCD) ); >> >> +active_entry_release(act); >> spin_unlock(&rgt->lock); > > Just for my understanding:

Re: [Xen-devel] [PATCHv9 1/4] gnttab: per-active entry locking

2015-05-21 Thread Jan Beulich
>>> On 20.05.15 at 17:54, wrote: > @@ -505,7 +526,7 @@ static int grant_map_exists(const struct domain *ld, > unsigned long mfn, > unsigned int *ref_count) > { > -const struct active_grant_entry *act; > +struct active_grant_entry *

[Xen-devel] [PATCHv9 1/4] gnttab: per-active entry locking

2015-05-20 Thread David Vrabel
Introduce a per-active entry spin lock to protect active entry state The grant table lock must be locked before acquiring (locking) an active entry. This is a step in reducing contention on the grant table lock, but will only do so once the grant table lock is turned into a read-write lock. Based