[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv11 2/4] gnttab: introduce maptrack lock
On 05/06/15 15:38, Jan Beulich wrote: >>>> On 05.06.15 at 15:44, <david.vrabel@xxxxxxxxxx> wrote: >> On 05/06/15 14:35, Jan Beulich wrote: >>>>>> On 02.06.15 at 18:26, <david.vrabel@xxxxxxxxxx> wrote: >>>> --- a/xen/common/grant_table.c >>>> +++ b/xen/common/grant_table.c >>>> @@ -288,10 +288,10 @@ static inline void put_maptrack_handle( >>>> struct grant_table *t, int handle) >>>> { >>>> - spin_lock(&t->lock); >>>> + spin_lock(&t->maptrack_lock); >>>> maptrack_entry(t, handle).ref = t->maptrack_head; >>>> t->maptrack_head = handle; >>>> - spin_unlock(&t->lock); >>>> + spin_unlock(&t->maptrack_lock); >>> >>> Starting with this change it becomes unclear what protects the >>> maptrack entries - the grant table lock or the maptrack one? >> >> The grant table lock. The docs aren't very good here -- the maptrack >> lock is only for the maptrack free list. > > I don't think the grant table lock serves that purpose, at least not > anymore after being converted to RW. See my reply on patch 3. Sorry for not being clear, after this patch #2 it is the grant table lock that serves this purpose. After #3 it's as you said there. David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |