lkml.org 
[lkml]   [2006]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] make sysctl_overcommit_memory enumeration sensible
    On Wed, Feb 15, 2006 at 08:01:10PM +1100, Nick Piggin wrote:
    > Coywolf Qi Hunt wrote:
    > >I see system admins often confused when they sysctl vm.overcommit_memory.
    > >This patch makes overcommit_memory enumeration sensible.
    > >
    >
    > What's the point? The current has been there for a long time, and
    > is well documented.

    Yes, the current is well documented and for a long time. But the design is
    insane, no matter how well and how long it is documented. Users have to read
    the document for *many times*.

    The new way is logical so it would let us "read once, remember always".


    Coywolf

    >
    > >0 - no overcommit
    > >1 - always overcommit
    > >2 - heuristic overcommit (default)
    > >
    > >I don't feel this would break any userspace scripts.
    >
    > You mean, except for the ones that go `echo 0 >
    > /proc/sys/vm/overcommit_memory`;
    > or `echo 2 > /proc/sys/vm/overcommit_memory` ?
    >
    > And those sysctl configuration files that get set at bootup?
    >
    > >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;
    > >
    >
    >
    > --
    > SUSE Labs, Novell Inc.
    > Send instant messages to your online friends http://au.messenger.yahoo.com
    >

    --
    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/

    \
     
     \ /
      Last update: 2006-02-16 02:30    [W:0.042 / U:0.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site