> So back to unmap_vmas. I wonder if we are missing the lazy_unmap flag
> in 2.6.38.
>
> > [<c0196296>] ? unmap_vmas+0x3d6/0x820
Try the attached patch
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index f608942..19444e6 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -2049,6 +2049,8 @@ void __init xen_init_mmu_ops(void)
x86_init.paging.pagetable_setup_done = xen_pagetable_setup_done;
pv_mmu_ops = xen_mmu_ops;
+ vmap_lazy_unmap = false;
+
memset(dummy_mapping, 0xff, PAGE_SIZE);
}
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 4ed6fcd..65c3d39 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -7,6 +7,8 @@
struct vm_area_struct; /* vma defining user mapping in mm_types.h */
+extern bool vmap_lazy_unmap;
+
/* bits in flags of vmalloc's vm_struct below */
#define VM_IOREMAP 0x00000001 /* ioremap() and friends */
#define VM_ALLOC 0x00000002 /* vmalloc() */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index f9b1667..6ab12de 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -31,6 +31,8 @@
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
+bool vmap_lazy_unmap __read_mostly = true;
+
/*** Page table manipulation functions ***/
static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end)
@@ -501,6 +503,9 @@ static unsigned long lazy_max_pages(void)
{
unsigned int log;
+ if (!vmap_lazy_unmap)
+ return 0;
+
log = fls(num_online_cpus());
return log * (32UL * 1024 * 1024 / PAGE_SIZE);
add_vmap_lazy_unmap.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|