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

Re: [Minios-devel] [PATCH v2 18/18] mini-os: balloon up in case of oom



Juergen Gross, on Fri 05 Aug 2016 19:36:02 +0200, wrote:
> +static inline int chk_free_pages(unsigned long needed)
> +{
> +    return needed > nr_free_pages;
> +}

The logic looks reversed to me:

> +    if ( chk_free_pages(1UL << order) )
> +        goto no_memory;

I would have written it

> +    if ( !chk_free_pages(1UL << order) )
> +        goto no_memory;

"If there are not enough free pages for this amount, go out".

Otherwise it looks good,

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

Samuel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

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