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

[Xen-devel] Re: [PATCH 2/7] xen: avoid adding non-existant memory if the reservation is unlimited



On Thu, Sep 15, 2011 at 01:29:23PM +0100, David Vrabel wrote:
> From: David Vrabel <david.vrabel@xxxxxxxxxx>
> 
> If the domain's reservation is unlimited, too many pages are added to
> the balloon memory region.  Correctly check the limit so the number of
> extra pages is not increased in this case.

and this one is in 3.1 too. Albeit with a more verbose description.
Look in git commit: e3b73c4a25e9a5705b4ef28b91676caf01f9bc9f

> 
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> ---
>  arch/x86/xen/setup.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index c3b8d44..46d6d21 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -306,10 +306,12 @@ char * __init xen_memory_setup(void)
>       sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
>  
>       extra_limit = xen_get_max_pages();
> -     if (extra_limit >= max_pfn)
> -             extra_pages = extra_limit - max_pfn;
> -     else
> -             extra_pages = 0;
> +     if (max_pfn + extra_pages > extra_limit) {
> +             if (extra_limit > max_pfn)
> +                     extra_pages = extra_limit - max_pfn;
> +             else
> +                     extra_pages = 0;
> +     }
>  
>       extra_pages += xen_return_unused_memory(xen_start_info->nr_pages, 
> &e820);
>  
> -- 
> 1.7.2.5

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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