[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] gnttab: don't use domain lock for serialization



xen/common/grant_table.c
174 static inline void 
175 double_gt_lock(struct grant_table *lgt, struct grant_table *rgt) 
176 { 
177 if ( lgt < rgt ) 
178 { 
179 spin_lock(&lgt->lock); 
180 spin_lock(&rgt->lock); 
181 } 
182 else 
183 { 
184 if ( lgt != rgt ) 
185     spin_lock(&rgt->lock); 
186 spin_lock(&lgt->lock); //here if the same, we just lock once.
187 } 
188 }
 
I have a question, when lgt == rgt ?
remote domain's grant_table is created by itself, so how they get the same?
Thanks a lot!
 

tupeng212
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.