proc.5 modification
cover proc.5 modification
Hello Michael,
Two patches related to proc.5:
- the first patch adds an explanation of /proc/sys/vm/compact_memory
- the second patch fixes two typo's (of which I'm guilty myself) in the buddyinfo section of proc.5
my 2 cents
E.
Elie De Brauwer (2):
proc.5: Explain /proc/sys/vm/compact_memory
proc.5: tfix
man5/proc.5 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1421954463-2853-1-git-send-email-eliedebrauwer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/2 proc.5: Explain /proc/sys/vm/compact_memory
Since 2.6.36 [1] CONFIG_COMPACTION is supported in Linux (for a detailed explanation see [2]). But in essence the contents of /proc/buddyinfo shows how much contiguous areas of a certain size are available. These numbers are not actually up to date as the Linux kernel will implicitely trigger compaction (+- defragmentation) when an allocation is done. This makes it difficult since you can't predict upfront whether or not a large allocation will succeed or not.
By using /proc/sys/vm/compact_memory you can explicitely trigger compaction to occur and /proc/buddyinfo will give a more realistic view on the available memory in contiguous areas.
This patch updates proc.5 to explain the usage of this file and is inspired upon Documentation/systcl/vm.txt [3]
[1] http://kernelnewbies.org/Linux_2_6_35#head-9cb0a1275559d40296da42efb7977896ac9edab7
[2] http://lwn.net/Articles/368869/
[3] http://lxr.free-electrons.com/source/Documentation/sysctl/vm.txt#L100
--- man5/proc.5 | 9 +++++++++ 1 file changed, 9 insertions(+)
man5/proc.5 +9 -0
@@ -3943,6 +3943,15 @@ On some systems, it is not present. This directory contains files for memory management tuning, buffer and cache management. .TP +.IR /proc/sys/vm/compact_memory " (since Linux 2.6.35)" +When 1 is written to this file, all zones are compacted such that free +memory is available in contiguous blocks where possible. +The effect of this action can be seen by examining +.IR /proc/buddyinfo . +.IP +Only present if the kernel was configured with +.BR CONFIG_COMPACTION . +.TP .IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)" Writing to this file causes the kernel to drop clean caches, dentries, and inodes from memory, causing that memory to become free.
Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1421954463-2853-2-git-send-email-eliedebrauwer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH 1/2] proc.5: Explain /proc/sys/vm/compact_memory
Quoted 11 lines · Elie De Brauwer
Since 2.6.36 [1]
CONFIG_COMPACTIONis supported in Linux (for a detailed explanation see [2]). But in essence the contents of/proc/buddyinfoshows how much contiguous areas of a certain size are available. These numbers are not actually up to date as the Linux kernel will implicitely trigger compaction (+- defragmentation) when an allocation is done. This makes it difficult since you can't predict upfront whether or not a large allocation will succeed or not.
By using/proc/sys/vm/compact_memoryyou can explicitely trigger compaction to occur and/proc/buddyinfowill give a more realistic view on the available memory in contiguous areas.
Quoted 6 lines
This patch updates proc.5 to explain the usage of this file and is inspired upon
Documentation/systcl/vm.txt[3][1] http://kernelnewbies.org/Linux_2_6_35#head-9cb0a1275559d40296da42efb7977896ac9edab7
[2] http://lwn.net/Articles/368869/
[3] http://lxr.free-electrons.com/source/Documentation/sysctl/vm.txt#L100
Thanks, Elie. Applied.
Cheers,
Michael
Quoted 26 lines
Signed-off-by Elie De Brauwer <[email protected]>--- man5/proc.5 | 9 +++++++++ 1 file changed, 9 insertions(+)man5/proc.5 +9
-0@@ -3943,6 +3943,15 @@ On some systems, it is not present. This directory contains files for memory management tuning, buffer and cache management. .TP +.IR /proc/sys/vm/compact_memory " (since Linux 2.6.35)" +When 1 is written to this file, all zones are compacted such that free +memory is available in contiguous blocks where possible. +The effect of this action can be seen by examining +.IR /proc/buddyinfo . +.IP +Only present if the kernel was configured with +.BR CONFIG_COMPACTION . +.TP .IR /proc/sys/vm/drop_caches " (since Linux 2.6.16)" Writing to this file causes the kernel to drop clean caches, dentries, and inodes from memory, causing that memory to become free.
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 proc.5: tfix
In reply to a message not in the archive--- man5/proc.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man5/proc.5 +2 -2
@@ -1981,12 +1981,12 @@ Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587 In this example, there is one node containing three zones and there are 11 different chunk sizes. -If the page size is 4 kilobyteis, then the first zone called +If the page size is 4 kilobytes, then the first zone called .I DMA (on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes (order 0) available and has 3 chunks of 4 megabytes (order 10) available. -If the memory is heavily fragmentated, the counters for higher +If the memory is heavily fragmented, the counters for higher order chunks will be zero and allocation of large contiguous areas will fail.
Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1421954463-2853-3-git-send-email-eliedebrauwer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Michael Kerrisk (man-pages)
AppliedRe: [PATCH 2/2] proc.5: tfix
Thanks Elie!
Applied.
Cheers,
Michael
Quoted 25 lines · Elie De Brauwer
Signed-off-by Elie De Brauwer <[email protected]>--- man5/proc.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man5/proc.5 +2
-2@@ -1981,12 +1981,12 @@ Node 0, zone Normal 216 55 189 101 84 38 37 27 5 3 587 In this example, there is one node containing three zones and there are 11 different chunk sizes. -If the page size is 4 kilobyteis, then the first zone called +If the page size is 4 kilobytes, then the first zone called .I DMA (on x86 the first 16 megabyte of memory) has 1 chunk of 4 kilobytes (order 0) available and has 3 chunks of 4 megabytes (order 10) available. -If the memory is heavily fragmentated, the counters for higher +If the memory is heavily fragmented, the counters for higher order chunks will be zero and allocation of large contiguous areas will fail.
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html