public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] make sysctl_overcommit_memory enumeration sensible
@ 2006-02-15  8:54 Coywolf Qi Hunt
  2006-02-15  9:01 ` Nick Piggin
  2006-02-15  9:05 ` Andrew Morton
  0 siblings, 2 replies; 11+ messages in thread
From: Coywolf Qi Hunt @ 2006-02-15  8:54 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

I see system admins often confused when they sysctl vm.overcommit_memory.
This patch makes overcommit_memory enumeration sensible.

0 - no overcommit
1 - always overcommit
2 - heuristic overcommit (default)

I don't feel this would break any userspace scripts. If it seems OK, I'll
update the documents.

Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---
diff --git a/include/linux/mman.h b/include/linux/mman.h
index 18a5689..e50f5ad 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -10,9 +10,9 @@
 #define MREMAP_MAYMOVE	1
 #define MREMAP_FIXED	2
 
-#define OVERCOMMIT_GUESS		0
+#define OVERCOMMIT_NEVER		0
 #define OVERCOMMIT_ALWAYS		1
-#define OVERCOMMIT_NEVER		2
+#define OVERCOMMIT_GUESS		2
 extern int sysctl_overcommit_memory;
 extern int sysctl_overcommit_ratio;
 extern atomic_t vm_committed_space;

-- 
Coywolf Qi Hunt

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

end of thread, other threads:[~2006-02-16  5:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-15  8:54 [patch] make sysctl_overcommit_memory enumeration sensible Coywolf Qi Hunt
2006-02-15  9:01 ` Nick Piggin
2006-02-15 13:50   ` Mark Hahn
2006-02-16  1:28   ` Coywolf Qi Hunt
2006-02-16  5:05     ` Nick Piggin
2006-02-15  9:05 ` Andrew Morton
2006-02-15  9:31   ` Coywolf Qi Hunt
2006-02-15 10:32     ` Avi Kivity
2006-02-15 10:43       ` Coywolf Qi Hunt
2006-02-15 13:04         ` Avi Kivity
2006-02-16  1:29           ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox