* [PATCH] hwpoison: fix oops on ksm pages
@ 2009-10-13 14:02 Hugh Dickins
2009-10-13 15:43 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Hugh Dickins @ 2009-10-13 14:02 UTC (permalink / raw)
To: Andi Kleen; +Cc: Wu Fengguang, Izik Eidus, Andrew Morton, linux-kernel
Memory failure on a KSM page currently oopses on its NULL anon_vma in
page_lock_anon_vma(): that may not be much worse than the consequence
of ignoring it, but it is better to be consistent with how ZERO_PAGE
and hugetlb pages and other awkward cases are treated. Just skip it.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
---
We could fix it for 2.6.32 at the KSM end, by putting a dummy anon_vma
pointer in there; but that would get harder next time, when KSM will
put a pointer to something else there (and I'm not currently planning
to do any work to open that up to memory_failure). So I would prefer
this simple PageKsm test, until the other exceptions are handled.
mm/memory-failure.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 2.6.32-rc4/mm/memory-failure.c 2009-09-28 00:28:41.000000000 +0100
+++ linux/mm/memory-failure.c 2009-10-13 14:09:12.000000000 +0100
@@ -35,6 +35,7 @@
#include <linux/mm.h>
#include <linux/page-flags.h>
#include <linux/sched.h>
+#include <linux/ksm.h>
#include <linux/rmap.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
@@ -661,7 +662,7 @@ static void hwpoison_user_mappings(struc
int i;
int kill = 1;
- if (PageReserved(p) || PageCompound(p) || PageSlab(p))
+ if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p))
return;
if (!PageLRU(p))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hwpoison: fix oops on ksm pages
2009-10-13 14:02 [PATCH] hwpoison: fix oops on ksm pages Hugh Dickins
@ 2009-10-13 15:43 ` Andi Kleen
2009-10-13 18:03 ` Hugh Dickins
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2009-10-13 15:43 UTC (permalink / raw)
To: Hugh Dickins
Cc: Andi Kleen, Wu Fengguang, Izik Eidus, Andrew Morton, linux-kernel
On Tue, Oct 13, 2009 at 03:02:11PM +0100, Hugh Dickins wrote:
> Memory failure on a KSM page currently oopses on its NULL anon_vma in
> page_lock_anon_vma(): that may not be much worse than the consequence
> of ignoring it, but it is better to be consistent with how ZERO_PAGE
> and hugetlb pages and other awkward cases are treated. Just skip it.
Thanks, Hugh. I'm curious: did this come out of code review or
did you actually run into that?
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hwpoison: fix oops on ksm pages
2009-10-13 15:43 ` Andi Kleen
@ 2009-10-13 18:03 ` Hugh Dickins
0 siblings, 0 replies; 4+ messages in thread
From: Hugh Dickins @ 2009-10-13 18:03 UTC (permalink / raw)
To: Andi Kleen; +Cc: Wu Fengguang, Izik Eidus, Andrew Morton, linux-kernel
On Tue, 13 Oct 2009, Andi Kleen wrote:
> On Tue, Oct 13, 2009 at 03:02:11PM +0100, Hugh Dickins wrote:
> > Memory failure on a KSM page currently oopses on its NULL anon_vma in
> > page_lock_anon_vma(): that may not be much worse than the consequence
> > of ignoring it, but it is better to be consistent with how ZERO_PAGE
> > and hugetlb pages and other awkward cases are treated. Just skip it.
>
> Thanks, Hugh. I'm curious: did this come out of code review or
> did you actually run into that?
Just out of code review: well, that's too fancy a name for it, I merely
remembered that I hadn't looked at ksm/hwpoison interoperabilty, so did
so just now. After looking at the code, I did then try MADV_HWPOISON on
a MADV_MERGEABLE area, to check that the problem and the fix were real.
Hugh
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] HWPOISON: fix oops on ksm pages
2009-10-22 6:02 ` [PATCH] HWPOISON: Fix page count leak in hwpoison late kill in do_swap_page Andi Kleen
@ 2009-10-22 6:02 ` Andi Kleen
0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2009-10-22 6:02 UTC (permalink / raw)
To: linux-kernel; +Cc: fengguang.wu, Hugh Dickins, Andi Kleen
From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Memory failure on a KSM page currently oopses on its NULL anon_vma in
page_lock_anon_vma(): that may not be much worse than the consequence
of ignoring it, but it is better to be consistent with how ZERO_PAGE
and hugetlb pages and other awkward cases are treated. Just skip it.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
mm/memory-failure.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index e17ec3f..e354b9f 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -35,6 +35,7 @@
#include <linux/mm.h>
#include <linux/page-flags.h>
#include <linux/sched.h>
+#include <linux/ksm.h>
#include <linux/rmap.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
@@ -644,7 +645,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn,
int i;
int kill = 1;
- if (PageReserved(p) || PageCompound(p) || PageSlab(p))
+ if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p))
return;
/*
--
1.6.0.2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-22 6:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13 14:02 [PATCH] hwpoison: fix oops on ksm pages Hugh Dickins
2009-10-13 15:43 ` Andi Kleen
2009-10-13 18:03 ` Hugh Dickins
[not found] <i>
2009-10-22 6:02 ` HWPOISON updates for 2.6.32-rc5 for review Andi Kleen
2009-10-22 6:02 ` [PATCH] HWPOISON: Clean up PR_MCE_KILL interface Andi Kleen
2009-10-22 6:02 ` [PATCH] HWPOISON: Add brief hwpoison description to Documentation Andi Kleen
2009-10-22 6:02 ` [PATCH] HWPOISON: return early on non-LRU pages Andi Kleen
2009-10-22 6:02 ` [PATCH] HWPOISON: Fix page count leak in hwpoison late kill in do_swap_page Andi Kleen
2009-10-22 6:02 ` [PATCH] HWPOISON: fix oops on ksm pages Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome