WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] kernel BUG at mm/swapfile.c:2524

To: "Christopher S. Aker" <caker@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] kernel BUG at mm/swapfile.c:2524
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 21 Apr 2011 11:24:42 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Peter Sandin <psandin@xxxxxxxxxx>
Delivery-date: Thu, 21 Apr 2011 08:25:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110421151453.GA25745@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <FEE62514-E221-4DDA-8E28-D0579AB582B8@xxxxxxxxxx> <20110407135009.GA7258@xxxxxxxxxxxx> <3FC940A3-FD29-40E9-8F09-E43D77B6E6F2@xxxxxxxxxx> <4DB045F6.9080301@xxxxxxxxxxxx> <20110421151453.GA25745@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
> 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);

Attachment: add_vmap_lazy_unmap.patch
Description: Text Data

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