Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423047AbWBOIzA (ORCPT ); Wed, 15 Feb 2006 03:55:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423050AbWBOIy7 (ORCPT ); Wed, 15 Feb 2006 03:54:59 -0500 Received: from [218.25.172.144] ([218.25.172.144]:61194 "HELO mail.fc-cn.com") by vger.kernel.org with SMTP id S1423047AbWBOIy6 (ORCPT ); Wed, 15 Feb 2006 03:54:58 -0500 Date: Wed, 15 Feb 2006 16:54:56 +0800 From: Coywolf Qi Hunt To: akpm@osdl.org Cc: linux-kernel@vger.kernel.org Subject: [patch] make sysctl_overcommit_memory enumeration sensible Message-ID: <20060215085456.GA2481@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060126 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1093 Lines: 36 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 --- 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/