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

Re: [Xen-devel] [PATCHv4 10/14] xen/gntdev: convert priv->lock to a mutex



On 26/01/15 18:57, Stefano Stabellini wrote:
> 
>> @@ -443,14 +443,14 @@ static void mn_invl_range_start(struct mmu_notifier 
>> *mn,
>>      struct gntdev_priv *priv = container_of(mn, struct gntdev_priv, mn);
>>      struct grant_map *map;
>>  
>> -    spin_lock(&priv->lock);
>> +    mutex_lock(&priv->lock);
>>      list_for_each_entry(map, &priv->maps, next) {
>>              unmap_if_in_range(map, start, end);
>>      }
>>      list_for_each_entry(map, &priv->freeable_maps, next) {
>>              unmap_if_in_range(map, start, end);
>>      }
>> -    spin_unlock(&priv->lock);
>> +    mutex_unlock(&priv->lock);
>>  }
> 
> I don't think that mmu_notifier callbacks are allowed to sleep:
> 
> https://lkml.org/lkml/2010/1/25/187

I don't think that limitation exists any more.  SRCU is used and you can
sleep between tlb_gather_mmu()/tlb_finish_mmu().

Perhaps you could point to something that isn't 5 years old?

David

_______________________________________________
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®.