From: Hugh Dickins CommitLimit was a good addition to /proc/meminfo, but we don't usually show both what's used and what's free: don't waste lines of screenspace, omit CommitAvail, let the user do the arithmetic as with all the others. And in updating that Documentation, removed the long-gone ReverseMaps. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton --- 25-akpm/Documentation/filesystems/proc.txt | 14 -------------- 25-akpm/Documentation/vm/overcommit-accounting | 5 ++--- 25-akpm/fs/proc/proc_misc.c | 2 -- 3 files changed, 2 insertions(+), 19 deletions(-) diff -puN Documentation/filesystems/proc.txt~omit-commitavail Documentation/filesystems/proc.txt --- 25/Documentation/filesystems/proc.txt~omit-commitavail 2004-10-24 23:13:53.048897528 -0700 +++ 25-akpm/Documentation/filesystems/proc.txt 2004-10-24 23:13:53.057896160 -0700 @@ -380,9 +380,7 @@ Mapped: 280372 kB Slab: 684068 kB CommitLimit: 7669796 kB Committed_AS: 100056 kB -CommitAvail: 7569740 kB PageTables: 24448 kB -ReverseMaps: 1080904 VmallocTotal: 112216 kB VmallocUsed: 428 kB VmallocChunk: 111088 kB @@ -446,20 +444,8 @@ Committed_AS: The amount of memory prese above) will not be permitted. This is useful if one needs to guarantee that processes will not fail due to lack of memory once that memory has been successfully allocated. - CommitAvail: Based on the current overcommit ratio - ('vm.overcommit_ratio'), this is the amount of memory - currently available to be allocated under the overcommit - limit (the CommitLimit above). This is calculated as: - CommitAvail = CommitLimit - Committed_AS - This limit is only enforced if strict overcommit accounting - is enabled (mode 2 in 'vm.overcommit_memory'). CommitAvail - may be a negative number if strict accounting is not enabled - and the system's memory is currently overcommitted. - For more details, see the memory overcommit documentation - in vm/overcommit-accounting. PageTables: amount of memory dedicated to the lowest level of page tables. - ReverseMaps: number of reverse mappings performed VmallocTotal: total size of vmalloc memory area VmallocUsed: amount of vmalloc area which is used VmallocChunk: largest contigious block of vmalloc area which is free diff -puN Documentation/vm/overcommit-accounting~omit-commitavail Documentation/vm/overcommit-accounting --- 25/Documentation/vm/overcommit-accounting~omit-commitavail 2004-10-24 23:13:53.050897224 -0700 +++ 25-akpm/Documentation/vm/overcommit-accounting 2004-10-24 23:13:53.058896008 -0700 @@ -22,9 +22,8 @@ The overcommit policy is set via the sys The overcommit percentage is set via `vm.overcommit_ratio'. -The current overcommit limit, amount used, and amount remaining below -the limit are viewable in /proc/meminfo as CommitLimit, Committed_AS, and -CommitAvail respectively. +The current overcommit limit and amount committed are viewable in +/proc/meminfo as CommitLimit and Committed_AS respectively. Gotchas ------- diff -puN fs/proc/proc_misc.c~omit-commitavail fs/proc/proc_misc.c --- 25/fs/proc/proc_misc.c~omit-commitavail 2004-10-24 23:13:53.052896920 -0700 +++ 25-akpm/fs/proc/proc_misc.c 2004-10-24 23:13:53.058896008 -0700 @@ -204,7 +204,6 @@ static int meminfo_read_proc(char *page, "Slab: %8lu kB\n" "CommitLimit: %8lu kB\n" "Committed_AS: %8lu kB\n" - "CommitAvail: %8ld kB\n" "PageTables: %8lu kB\n" "VmallocTotal: %8lu kB\n" "VmallocUsed: %8lu kB\n" @@ -228,7 +227,6 @@ static int meminfo_read_proc(char *page, K(ps.nr_slab), K(allowed), K(committed), - K(allowed - committed), K(ps.nr_page_table_pages), vmtot, vmi.used, _