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



> -----Original Message-----
> From: George Dunlap [mailto:george.dunlap@xxxxxxxxxx]
> Sent: 12 September 2018 11:02
> To: Jan Beulich <JBeulich@xxxxxxxx>; Paul Durrant
> <Paul.Durrant@xxxxxxxxxx>
> Cc: Julien Grall <julien.grall@xxxxxxx>; Andrew Cooper
> <Andrew.Cooper3@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Wei
> Liu <wei.liu2@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; xen-
> devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Konrad Rzeszutek Wilk
> <konrad.wilk@xxxxxxxxxx>; Tim (Xen.org) <tim@xxxxxxx>
> 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.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.
> 

Jan?

  Paul

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