>>> On 12.09.18 at 12:01, <george.dun...@citrix.com> wrote: > On 09/12/2018 10:15 AM, Jan Beulich wrote: >>>>> On 12.09.18 at 11:10, <paul.durr...@citrix.com> wrote: >>>> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf >>>> Of Jan Beulich >>>> Sent: 11 September 2018 15:56 >>>> >>>>>>> On 23.08.18 at 11:47, <paul.durr...@citrix.com> 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@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel