[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0908212003190.24376@sister.anvils>
Date: Fri, 21 Aug 2009 20:23:51 +0100 (BST)
From: Hugh Dickins <hugh.dickins@...cali.co.uk>
To: Andi Kleen <andi@...stfloor.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Izik Eidus <ieidus@...hat.com>,
Chris Wright <chrisw@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Michael Kerrisk <mtk.manpages@...il.com>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Ralf Baechle <ralf@...ux-mips.org>,
Kyle McMartin <kyle@...artin.ca>, Helge Deller <deller@....de>,
Chris Zankel <chris@...kel.net>,
Rik van RIel <riel@...hat.com>,
Balbir Singh <balbir@...ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Avi Kivity <avi@...hat.com>,
Nick Piggin <nickpiggin@...oo.com.au>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH mmotm] ksm: antidote to MADV_MERGEABLE HWPOISON
On Fri, 21 Aug 2009, Andi Kleen wrote:
> On Fri, Aug 21, 2009 at 07:30:15PM +0100, Hugh Dickins wrote:
> > linux-next is now sporting MADV_HWPOISON at 12, which would have a very
> > nasty effect on KSM if you had CONFIG_MEMORY_FAILURE=y with CONFIG_KSM=y.
> > Shift MADV_MERGEABLE and MADV_UNMERGEABLE down two - two to reduce the
> > confusion if old and new userspace and kernel are mismatched.
> >
> > Personally I'd prefer the MADV_HWPOISON testing feature to shift; but
> > linux-next comes first in the mmotm lineup, and I can't be sure that
> > madvise KSM already has more users than there are HWPOISON testers:
> > so unless Andi is happy to shift MADV_HWPOISON, mmotm needs this.
>
> Thanks for catching.
>
> Shifting is fine, but I would prefer then if it was to some
> value that is not reused (like 100) so that I can probe for it
> in the test programs.
Thanks a lot for conceding so generously, Andi.
Okay, let's forget that first patch I posted: here's its replacement,
fix to linux-next.patch in mmotm, but you'll put into your tree to be
picked up by linux-next in due course? Thanks again. (patch ends up
with the 100 line in between the 11 line and the 12 line, but doesn't
matter, it'll be easier to tidy that up with another patch afterwards.)
[PATCH] hwpoison: shift MADV_HWPOISON to 100
mm assigns KSM's MADV_MERGEABLE to 12: shift MADV_HWPOISON from 12 to 100,
out of the way so that poisoning test programs can safely probe for it.
Signed-off-by: Hugh Dickins <hugh.dickins@...cali.co.uk>
---
include/asm-generic/mman-common.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- next/include/asm-generic/mman-common.h 2009-08-21 19:51:15.000000000 +0100
+++ mmotm/include/asm-generic/mman-common.h 2009-08-21 19:53:21.000000000 +0100
@@ -34,7 +34,8 @@
#define MADV_REMOVE 9 /* remove these pages & resources */
#define MADV_DONTFORK 10 /* don't inherit across fork */
#define MADV_DOFORK 11 /* do inherit across fork */
-#define MADV_HWPOISON 12 /* poison a page for testing */
+
+#define MADV_HWPOISON 100 /* poison a page for testing */
/* compatibility flags */
#define MAP_FILE 0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists