Commit dd619f7b authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] omit CommitAvail

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: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9ceab3e2
...@@ -380,9 +380,7 @@ Mapped: 280372 kB ...@@ -380,9 +380,7 @@ Mapped: 280372 kB
Slab: 684068 kB Slab: 684068 kB
CommitLimit: 7669796 kB CommitLimit: 7669796 kB
Committed_AS: 100056 kB Committed_AS: 100056 kB
CommitAvail: 7569740 kB
PageTables: 24448 kB PageTables: 24448 kB
ReverseMaps: 1080904
VmallocTotal: 112216 kB VmallocTotal: 112216 kB
VmallocUsed: 428 kB VmallocUsed: 428 kB
VmallocChunk: 111088 kB VmallocChunk: 111088 kB
...@@ -446,20 +444,8 @@ Committed_AS: The amount of memory presently allocated on the system. ...@@ -446,20 +444,8 @@ Committed_AS: The amount of memory presently allocated on the system.
above) will not be permitted. This is useful if one needs above) will not be permitted. This is useful if one needs
to guarantee that processes will not fail due to lack of to guarantee that processes will not fail due to lack of
memory once that memory has been successfully allocated. 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 PageTables: amount of memory dedicated to the lowest level of page
tables. tables.
ReverseMaps: number of reverse mappings performed
VmallocTotal: total size of vmalloc memory area VmallocTotal: total size of vmalloc memory area
VmallocUsed: amount of vmalloc area which is used VmallocUsed: amount of vmalloc area which is used
VmallocChunk: largest contigious block of vmalloc area which is free VmallocChunk: largest contigious block of vmalloc area which is free
......
...@@ -22,9 +22,8 @@ The overcommit policy is set via the sysctl `vm.overcommit_memory'. ...@@ -22,9 +22,8 @@ The overcommit policy is set via the sysctl `vm.overcommit_memory'.
The overcommit percentage is set via `vm.overcommit_ratio'. The overcommit percentage is set via `vm.overcommit_ratio'.
The current overcommit limit, amount used, and amount remaining below The current overcommit limit and amount committed are viewable in
the limit are viewable in /proc/meminfo as CommitLimit, Committed_AS, and /proc/meminfo as CommitLimit and Committed_AS respectively.
CommitAvail respectively.
Gotchas Gotchas
------- -------
......
...@@ -204,7 +204,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off, ...@@ -204,7 +204,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
"Slab: %8lu kB\n" "Slab: %8lu kB\n"
"CommitLimit: %8lu kB\n" "CommitLimit: %8lu kB\n"
"Committed_AS: %8lu kB\n" "Committed_AS: %8lu kB\n"
"CommitAvail: %8ld kB\n"
"PageTables: %8lu kB\n" "PageTables: %8lu kB\n"
"VmallocTotal: %8lu kB\n" "VmallocTotal: %8lu kB\n"
"VmallocUsed: %8lu kB\n" "VmallocUsed: %8lu kB\n"
...@@ -228,7 +227,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off, ...@@ -228,7 +227,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
K(ps.nr_slab), K(ps.nr_slab),
K(allowed), K(allowed),
K(committed), K(committed),
K(allowed - committed),
K(ps.nr_page_table_pages), K(ps.nr_page_table_pages),
vmtot, vmtot,
vmi.used, vmi.used,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment