linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] register MADV_HUGEPAGE
@ 2010-01-16 18:46 Andrea Arcangeli
  2010-01-17 11:08 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2010-01-16 18:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

From: Andrea Arcangeli <aarcange@redhat.com>

In order to allow early shipping transparent hugepage feature enabled
only inside MADV_HUGEPAGE and not globally to diminish the risk of
unexpected performance regressions on non-hypervisor related usages
I'd need this little define registered. This is also to avoid things
like this:

#define MADV_DOFORK	11	    	 /* do inherit across fork */
#define MADV_HWPOISON	100		    /* poison a page for testing */

Picking random number not so nice... and with my proof of concept
patch posted working and boosting performance equally to hugetlbfs but
without its limitations, I think it is a given that eventually KVM
will run inside MADV_HUGEPAGE madvise regions only, so I see a
negligeable risk to pollute the kernel in including this as first bit
of the full patchset.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

The rest of the transparent hugepage patchset is very ready for
inclusion too with all cleanups requested and after full handling of
all review on linux-mm so far, with the only exception of khugepaged
that is about to be finished, expect a new submit on linux-mm in a few
days. Then we'll have to plug Mel memory compaction on top of it.

(in addition to the below, /sys/kernel/mm/transparent_hugepage also
has been moved to some other distro specific location to avoid any
possible risk of clashes or confusion with future mainline behavior)

Thanks,
Andrea

diff --git a/include/asm-generic/mman-common.h b/include/asm-generic/mman-common.h
--- a/include/asm-generic/mman-common.h
+++ b/include/asm-generic/mman-common.h
@@ -45,6 +45,8 @@
 #define MADV_MERGEABLE   12		/* KSM may merge identical pages */
 #define MADV_UNMERGEABLE 13		/* KSM may not merge identical pages */
 
+#define MADV_HUGEPAGE	14		/* Worth backing with hugepages */
+
 /* compatibility flags */
 #define MAP_FILE	0
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] register MADV_HUGEPAGE
  2010-01-16 18:46 [PATCH] register MADV_HUGEPAGE Andrea Arcangeli
@ 2010-01-17 11:08 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2010-01-17 11:08 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Andrew Morton, linux-kernel, linux-mm, davem

On Sat, Jan 16, 2010 at 07:46:42PM +0100, Andrea Arcangeli wrote:
> From: Andrea Arcangeli <aarcange@redhat.com>
> 
> In order to allow early shipping transparent hugepage feature enabled
> only inside MADV_HUGEPAGE and not globally to diminish the risk of
> unexpected performance regressions on non-hypervisor related usages
> I'd need this little define registered. This is also to avoid things
> like this:

NACK, usespace ABIs only go in when features are added.  There's a more
than large enough chance that it will change for one reason or another.

And while transparent hugepages are a good feature to add, it's still in
a far to early stage to go on with it.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-17 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16 18:46 [PATCH] register MADV_HUGEPAGE Andrea Arcangeli
2010-01-17 11:08 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).