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

Re: [Xen-devel] [PATCH v6 12/14] memory: add get_paged_gfn() as a wrapper...



>>> On 12.09.18 at 12:01, <george.dunlap@xxxxxxxxxx> wrote:
> On 09/12/2018 10:15 AM, Jan Beulich wrote:
>>>>> On 12.09.18 at 11:10, <Paul.Durrant@xxxxxxxxxx> wrote:
>>>> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf
>>>> Of Jan Beulich
>>>> Sent: 11 September 2018 15:56
>>>>
>>>>>>> On 23.08.18 at 11:47, <paul.durrant@xxxxxxxxxx> wrote:
>>>>> ...for some uses of get_page_from_gfn().
>>>>>
>>>>> There are many occurences of the following pattern in the code:
>>>>>
>>>>>     q = <readonly look-up> ? P2M_ALLOC : P2M_UNSHARE;
>>>>
>>>> Especially with this UNSHARE in mind - is "paged" in the helper
>>>> function's name really suitable? Since we (I think) already have
>>>> get_gfn(), how about try_get_gfn()?
>>>
>>> That name may be a little misleading since it suggests a close functional 
>>> relationship with get_gfn() whereas it does more than that. How about 
>>> try_get_page_from_gfn()?
>> 
>> Fine with me; George?
> 
> At the risk of bike shedding.. "try" to me means only pass/fail, with no
> side effects, and with no permissions checks.  What about
> "check_and_get_page_from_gfn()"?
> 
> I'd prefer 'check' but if anyone objects I'd rather just go with 'try'
> and get things in -- the code is a definite improvement.

I'm fine with "check", and indeed I wasn't really happy about the
earlier proposed "try".

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