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

[Xen-changelog] [PATCH] Re: PAE



ChangeSet 1.1159.258.150, 2005/05/21 00:16:46+01:00, kraxel@xxxxxxxxxxx

        [PATCH] Re: PAE
        
        > We're taking quite a chunk out of lowmem, though....
        
        Uhm, well, no, we don't.  We should though, fix is below.
        
        Current code in unstable takes the address space away from the
        vmalloc area, not the lowmem area.  vmalloc space is 128 MB by
        default, so the non-PAE hypervisor hole fits in and it works
        nevertheless.  The larger PAE mode hypervisor hole doesn't fit
        in, so it breaks when you use enougth memory (somewhere around
        800-900 MB).  I think that is the bug Scott Parish trapped into.
        
          Gerd



 arch/xen/i386/mm/init.c         |    5 ++++-
 include/asm-xen/asm-i386/page.h |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-20 20:04:28 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-20 20:04:28 
-04:00
@@ -654,7 +654,10 @@
 #else
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
 #endif
-
+       printk("vmalloc area: %lx-%lx, maxmem %lx\n",
+              VMALLOC_START,VMALLOC_END,MAXMEM);
+       BUG_ON(VMALLOC_START > VMALLOC_END);
+       
        /* this will put all low memory onto the freelists */
        totalram_pages += __free_all_bootmem();
        /* XEN: init and count low-mem pages outside initial allocation. */
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h   2005-05-20 
20:04:28 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h   2005-05-20 
20:04:28 -04:00
@@ -176,7 +176,7 @@
 
 #define PAGE_OFFSET            ((unsigned long)__PAGE_OFFSET)
 #define VMALLOC_RESERVE                ((unsigned long)__VMALLOC_RESERVE)
-#define MAXMEM                 (-__PAGE_OFFSET-__VMALLOC_RESERVE)
+#define MAXMEM                 
(HYPERVISOR_VIRT_START-__PAGE_OFFSET-__VMALLOC_RESERVE)
 #define __pa(x)                        ((unsigned long)(x)-PAGE_OFFSET)
 #define __va(x)                        ((void *)((unsigned 
long)(x)+PAGE_OFFSET))
 #define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)

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


 


Rackspace

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