From: Coywolf Qi Hunt <qiyong@fc-cn.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch] make sysctl_overcommit_memory enumeration sensible
Date: Wed, 15 Feb 2006 16:54:56 +0800 [thread overview]
Message-ID: <20060215085456.GA2481@localhost.localdomain> (raw)
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
next reply other threads:[~2006-02-15 8:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-15 8:54 Coywolf Qi Hunt [this message]
2006-02-15 9:01 ` [patch] make sysctl_overcommit_memory enumeration sensible 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060215085456.GA2481@localhost.localdomain \
--to=qiyong@fc-cn.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox