Re: [PATCH] madvise MADV_DONTFORK/MADV_DOFORK

From: Nick Piggin
Date: Tue Feb 14 2006 - 23:36:01 EST


Michael S. Tsirkin wrote:

Index: linux-2.6.16-rc2/include/asm-x86_64/mman.h
===================================================================
--- linux-2.6.16-rc2.orig/include/asm-x86_64/mman.h 2006-02-14 01:22:27.000000000 +0200
+++ linux-2.6.16-rc2/include/asm-x86_64/mman.h 2006-02-14 01:24:57.000000000 +0200
@@ -37,6 +37,8 @@
#define MADV_WILLNEED 0x3 /* pre-fault pages */
#define MADV_DONTNEED 0x4 /* discard these pages */
#define MADV_REMOVE 0x5 /* remove these pages & resources */
+#define MADV_DONTFORK 0x30 /* dont inherit across fork */
+#define MADV_DOFORK 0x31 /* do inherit across fork */

May I ask, what is the rationale for ignoring the apparent conventions
of all architectures? For example parisc, you appear to even go contrary
to the comment.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/