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

Re: [Xen-devel] [PATCH 2/2] gnttab: improve GNTTABOP_cache_flush locking



>>> On 01.12.17 at 16:31, <andre.przywara@xxxxxxxxxx> wrote:
> On 30/11/17 14:32, Jan Beulich wrote:
>> Dropping the lock before returning from grant_map_exists() means handing
>> possibly stale information back to the caller. Return back the pointer
>> to the active entry instead, for the caller to release the lock once
>> done.
> 
> I don't know enough about grant tables to reason about the deeper
> meaning of this patch, but at least I can confirm that the amended
> locking scheme seems to be correct (now).
> I just wonder if it's worthwhile to add a comment that the function
> takes a lock, but leaves it up to the caller to drop it. Since there is
> only one caller, this might be overkill, though.

Well, the function returning an active entry pointer is imo
sufficient documentation of that fact.

>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Andre Przywara <andre.przywara@xxxxxxxxxx>

Thanks, Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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