[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 12/04/2017 09:02 AM, Jan Beulich wrote:
>>>> 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.

I agree with this in principle.  But it still seems like function name
doesn't describe what the function does anymore.  What about renaming it
to "grant_map_find_entry()" or something?


Xen-devel mailing list



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