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

Re: [Xen-devel] [PATCH v8] x86/mem-sharing: mem-sharing a range of memory



>>> On 20.07.16 at 20:01, <tamas.lengyel@xxxxxxxxxxxx> wrote:
> +static int range_share(struct domain *d, struct domain *cd,
> +                       struct mem_sharing_op_range *range)
> +{
> +    int rc = 0;
> +    shr_handle_t sh, ch;
> +    unsigned long start = range->_scratchspace ?: range->start;
> +
> +    while( range->end >= start )

Coding style.

> @@ -500,7 +501,14 @@ struct xen_mem_sharing_op {
>              uint64_aligned_t client_gfn;    /* IN: the client gfn */
>              uint64_aligned_t client_handle; /* IN: handle to the client page 
> */
>              domid_t  client_domain; /* IN: the client domain id */
> -        } share; 
> +        } share;
> +        struct mem_sharing_op_range {         /* OP_RANGE_SHARE */
> +            uint64_aligned_t start;          /* IN: start gfn. */
> +            uint64_aligned_t end;            /* IN: end gfn (inclusive) */

Please include _gfn" in these names. And afaic using first_gfn and
last_gfn would better represent the inclusiveness of the range.

> +            uint64_aligned_t _scratchspace;  /* Must be set to 0 */

A little long a name. How about either the suggested "opaque" or
just "scratch"? In any event no reason for a leading underscore I
think.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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