> -----Original Message----- > From: George Dunlap [mailto:george.dun...@citrix.com] > Sent: 12 September 2018 11:02 > To: Jan Beulich <jbeul...@suse.com>; Paul Durrant > <paul.durr...@citrix.com> > Cc: Julien Grall <julien.gr...@arm.com>; Andrew Cooper > <andrew.coop...@citrix.com>; Ian Jackson <ian.jack...@citrix.com>; Wei > Liu <wei.l...@citrix.com>; Stefano Stabellini <sstabell...@kernel.org>; xen- > devel <xen-devel@lists.xenproject.org>; Konrad Rzeszutek Wilk > <konrad.w...@oracle.com>; Tim (Xen.org) <t...@xen.org> > Subject: Re: [Xen-devel] [PATCH v6 12/14] memory: add get_paged_gfn() as > a wrapper... > > 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. >
Jan? Paul > -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel