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

RE: [Xen-devel] pv-grub heap exhausted?



> Subject: Re: [Xen-devel] pv-grub heap exhausted?
> 
> > From: Samuel Thibault [mailto:samuel.thibault@xxxxxxxxxxxx]
> > Could you send us the log?
> 
> Oops sorry, it was in.  Could you try the patch below?
> 
> Samuel
> 
> 
> minios: Fix 18874 memory clipping
> 
> Fix 18874's memory clipping: there are three page-sized holes between
> direct mapping, demand mapping, heap pages and the end of memory.
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
> 
> diff -r f8187a343ad2 extras/mini-os/arch/x86/mm.c
> --- a/extras/mini-os/arch/x86/mm.c    Fri Feb 20 17:02:36 2009 +0000
> +++ b/extras/mini-os/arch/x86/mm.c    Sat Mar 07 02:33:30 2009 +0100
> @@ -599,7 +599,7 @@
>  void arch_init_mm(unsigned long* start_pfn_p, unsigned long*
> max_pfn_p)
>  {
> 
> -    unsigned long start_pfn, max_pfn, virt_pfns;
> +    unsigned long start_pfn, max_pfn;
> 
>      printk("  _text:        %p\n", &_text);
>      printk("  _etext:       %p\n", &_etext);
> @@ -614,9 +614,13 @@
>      max_pfn = start_info.nr_pages;
> 
>      /* We need room for demand mapping and heap, clip available memory
> */
> -    virt_pfns = DEMAND_MAP_PAGES + HEAP_PAGES;
> -    if (max_pfn + virt_pfns + 1 < max_pfn)
> -        max_pfn = -(virt_pfns + 1);
> +#if defined(__i386__)
> +    {
> +        unsigned long virt_pfns = 1 + DEMAND_MAP_PAGES + 1 +
> HEAP_PAGES;
> +        if (max_pfn + virt_pfns >= 0x100000)
> +            max_pfn = 0x100000 - virt_pfns - 1;
> +    }
> +#endif
> 
>      printk("  start_pfn:    %lx\n", start_pfn);
>      printk("  max_pfn:      %lx\n", max_pfn);


Yes, works now. Many thanks.

Anna

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