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

Re: [Xen-devel] [PATCH v7 6/9] Add the facility to limit ranges per rangeset



>>> On 09.05.14 at 10:40, <paul.durrant@xxxxxxxxxx> wrote:
> A subsequent patch exposes rangesets to secondary emulators, so to allow a
> limit to be placed on the amount of xenheap that an emulator can cause to be
> consumed, the function rangeset_limit() has been created to set the allowed
> number of ranges in a rangeset. By default, there is no limit.
> 
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

albeit ...

> --- a/xen/common/rangeset.c
> +++ b/xen/common/rangeset.c
> @@ -25,6 +25,9 @@ struct rangeset {
>  
>      /* Ordered list of ranges contained in this set, and protecting lock. 
> */
>      struct list_head range_list;
> +
> +    /* Number of ranges that can be allocated */
> +    long             nr_ranges;

I would have preferred this to be unsigned int (and to have the no-
limit case more explicitly handled by never decrementing the count
when it's e.g. UINT_MAX).

Jan


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


 


Rackspace

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