All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Bruce Edge <bruce.edge@gmail.com>
Cc: Boris Derzhavets <bderzhavets@yahoo.com>,
	xen-devel@lists.xensource.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: Re: 2.6.37-rc1 mainline domU - BUG: unable to handle kernel paging request
Date: Wed, 01 Dec 2010 22:33:51 -0800	[thread overview]
Message-ID: <4CF73DCF.4010200@goop.org> (raw)
In-Reply-To: <AANLkTi=_gdYqY5xTE73_oR56wVNa00DrJz3iG8b=KDO8@mail.gmail.com>

On 12/01/2010 01:32 PM, Bruce Edge wrote:
> I just checked the recently released 2.6.73-rc4,

Do you mean mainline 2.6.37-rc4, or the one in xen/next-2.6.37?

>  and while the BUG
> signature is different, it still fails under NFS accesses. This is
> 100% recreatable.

Please try this patch which is queued up for mainline.  It's already in
xen/next-2.6.37.

    J


diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 21ed8d7..0e4ecac 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -2358,8 +2358,6 @@ 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 a03dcf6..44b54f6 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -7,8 +7,6 @@
 
 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 a3d66b3..eb5cc7d 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -31,8 +31,6 @@
 #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)
@@ -503,9 +501,6 @@ 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);
@@ -566,7 +561,6 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
 			if (va->va_end > *end)
 				*end = va->va_end;
 			nr += (va->va_end - va->va_start) >> PAGE_SHIFT;
-			unmap_vmap_area(va);
 			list_add_tail(&va->purge_list, &valist);
 			va->flags |= VM_LAZY_FREEING;
 			va->flags &= ~VM_LAZY_FREE;
@@ -611,10 +605,11 @@ static void purge_vmap_area_lazy(void)
 }
 
 /*
- * Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been
- * called for the correct range previously.
+ * Free a vmap area, caller ensuring that the area has been unmapped
+ * and flush_cache_vunmap had been called for the correct range
+ * previously.
  */
-static void free_unmap_vmap_area_noflush(struct vmap_area *va)
+static void free_vmap_area_noflush(struct vmap_area *va)
 {
 	va->flags |= VM_LAZY_FREE;
 	atomic_add((va->va_end - va->va_start) >> PAGE_SHIFT, &vmap_lazy_nr);
@@ -623,6 +618,16 @@ static void free_unmap_vmap_area_noflush(struct vmap_area *va)
 }
 
 /*
+ * Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been
+ * called for the correct range previously.
+ */
+static void free_unmap_vmap_area_noflush(struct vmap_area *va)
+{
+	unmap_vmap_area(va);
+	free_vmap_area_noflush(va);
+}
+
+/*
  * Free and unmap a vmap area
  */
 static void free_unmap_vmap_area(struct vmap_area *va)
@@ -798,7 +803,7 @@ static void free_vmap_block(struct vmap_block *vb)
 	spin_unlock(&vmap_block_tree_lock);
 	BUG_ON(tmp != vb);
 
-	free_unmap_vmap_area_noflush(vb->va);
+	free_vmap_area_noflush(vb->va);
 	call_rcu(&vb->rcu_head, rcu_free_vb);
 }
 
@@ -936,6 +941,8 @@ static void vb_free(const void *addr, unsigned long size)
 	rcu_read_unlock();
 	BUG_ON(!vb);
 
+	vunmap_page_range((unsigned long)addr, (unsigned long)addr + size);
+
 	spin_lock(&vb->lock);
 	BUG_ON(bitmap_allocate_region(vb->dirty_map, offset >> PAGE_SHIFT, order));
 
@@ -988,7 +995,6 @@ void vm_unmap_aliases(void)
 
 				s = vb->va->va_start + (i << PAGE_SHIFT);
 				e = vb->va->va_start + (j << PAGE_SHIFT);
-				vunmap_page_range(s, e);
 				flush = 1;
 
 				if (s < start)

  reply	other threads:[~2010-12-02  6:33 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 10:34 Re: 2.6.37-rc1 mainline domU - BUG: unable to handle kernel paging request Boris Derzhavets
2010-11-18 16:40 ` Bruce Edge
2010-11-18 17:05   ` Boris Derzhavets
2010-11-18 20:05     ` Bruce Edge
2010-11-19  7:12       ` Boris Derzhavets
2010-11-19 18:16         ` Bruce Edge
2010-11-19 18:52           ` Boris Derzhavets
     [not found]           ` <697216.62238.qm@web56104.mail.re3.yahoo.com>
2010-12-01 21:32             ` Bruce Edge
2010-12-02  6:33               ` Jeremy Fitzhardinge [this message]
2010-12-02  8:33                 ` Boris Derzhavets
2010-12-02 14:41                 ` Bruce Edge
2010-12-02 18:05                   ` Bruce Edge
2010-12-02 18:28                     ` Jeremy Fitzhardinge
2010-12-02 18:38                       ` Bruce Edge
2010-12-02 18:50                         ` Jeremy Fitzhardinge
2010-12-02 19:34                           ` Bruce Edge
2010-11-19 14:32     ` Boris Derzhavets
  -- strict thread matches above, loose matches on Subject: below --
2010-11-16 19:20 Boris Derzhavets
2010-11-14 17:47 Boris Derzhavets
2010-11-14 17:52 ` Sander Eikelenboom
2010-11-10 22:15 Bruce Edge
2010-11-10 22:30 ` Bruce Edge
2010-11-10 23:03   ` Bruce Edge
2010-11-11 15:56     ` Konrad Rzeszutek Wilk
2010-11-11 16:32       ` Boris Derzhavets
2010-11-11 12:01   ` Boris Derzhavets
2010-11-11 12:08     ` Boris Derzhavets
2010-11-11 16:09       ` Konrad Rzeszutek Wilk
2010-11-11 16:29         ` Boris Derzhavets
2010-11-11 16:46           ` Konrad Rzeszutek Wilk
2010-11-11 16:53             ` Boris Derzhavets
2010-11-12 14:40               ` Bruce Edge
2010-11-12 16:06                 ` Boris Derzhavets
2010-11-13  8:37                   ` Boris Derzhavets
2010-11-12 16:27                 ` Sander Eikelenboom
2010-11-12 17:01                   ` Konrad Rzeszutek Wilk
2010-11-14 16:37                     ` Boris Derzhavets
2010-11-14 16:56                       ` Sander Eikelenboom
2010-11-14 17:09                         ` Boris Derzhavets
2010-11-14 17:19                           ` Sander Eikelenboom
2010-11-14 21:35                         ` Bruce Edge
2010-11-15  8:06                           ` Boris Derzhavets
2010-11-15 11:05                             ` Boris Derzhavets
2010-11-15 20:21                         ` Bruce Edge
2010-11-15 20:32                           ` Sander Eikelenboom
2010-11-16 18:43                           ` Boris Derzhavets
2010-11-16 19:00                             ` Konrad Rzeszutek Wilk
2010-11-16 20:43                               ` Boris Derzhavets
2010-11-16 21:15                                 ` Konrad Rzeszutek Wilk
2010-11-16 21:42                                   ` Boris Derzhavets
2010-11-16 21:49                                   ` Boris Derzhavets
2010-11-17 21:28                                     ` Bruce Edge
2010-11-16 20:50                               ` Boris Derzhavets
2010-11-11 16:46         ` Boris Derzhavets
2010-11-11 12:26     ` Boris Derzhavets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF73DCF.4010200@goop.org \
    --to=jeremy@goop.org \
    --cc=bderzhavets@yahoo.com \
    --cc=bruce.edge@gmail.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.