[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



On 10/08/16 23:07, Samuel Thibault wrote:
> 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".

Hmm, yes, I can see your point.

I'll change it.

> 
> Otherwise it looks good,
> 
> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

Thanks,

Juergen


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