diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/sysctl/vm.txt | 19 | ||||
-rw-r--r-- | Documentation/vm/hugetlbpage.txt | 35 |
2 files changed, 48 insertions, 6 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index b89570c30434..6f31f0a247d0 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -34,6 +34,8 @@ Currently, these files are in /proc/sys/vm: | |||
34 | - oom_kill_allocating_task | 34 | - oom_kill_allocating_task |
35 | - mmap_min_address | 35 | - mmap_min_address |
36 | - numa_zonelist_order | 36 | - numa_zonelist_order |
37 | - nr_hugepages | ||
38 | - nr_overcommit_hugepages | ||
37 | 39 | ||
38 | ============================================================== | 40 | ============================================================== |
39 | 41 | ||
@@ -305,3 +307,20 @@ will select "node" order in following case. | |||
305 | 307 | ||
306 | Otherwise, "zone" order will be selected. Default order is recommended unless | 308 | Otherwise, "zone" order will be selected. Default order is recommended unless |
307 | this is causing problems for your system/application. | 309 | this is causing problems for your system/application. |
310 | |||
311 | ============================================================== | ||
312 | |||
313 | nr_hugepages | ||
314 | |||
315 | Change the minimum size of the hugepage pool. | ||
316 | |||
317 | See Documentation/vm/hugetlbpage.txt | ||
318 | |||
319 | ============================================================== | ||
320 | |||
321 | nr_overcommit_hugepages | ||
322 | |||
323 | Change the maximum size of the hugepage pool. The maximum is | ||
324 | nr_hugepages + nr_overcommit_hugepages. | ||
325 | |||
326 | See Documentation/vm/hugetlbpage.txt | ||
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt index 51ccc48aa763..f962d01bea2a 100644 --- a/Documentation/vm/hugetlbpage.txt +++ b/Documentation/vm/hugetlbpage.txt | |||
@@ -30,9 +30,10 @@ alignment and size of the arguments to the above system calls. | |||
30 | The output of "cat /proc/meminfo" will have lines like: | 30 | The output of "cat /proc/meminfo" will have lines like: |
31 | 31 | ||
32 | ..... | 32 | ..... |
33 | HugePages_Total: xxx | 33 | HugePages_Total: vvv |
34 | HugePages_Free: yyy | 34 | HugePages_Free: www |
35 | HugePages_Rsvd: www | 35 | HugePages_Rsvd: xxx |
36 | HugePages_Surp: yyy | ||
36 | Hugepagesize: zzz kB | 37 | Hugepagesize: zzz kB |
37 | 38 | ||
38 | where: | 39 | where: |
@@ -42,6 +43,10 @@ allocated. | |||
42 | HugePages_Rsvd is short for "reserved," and is the number of hugepages | 43 | HugePages_Rsvd is short for "reserved," and is the number of hugepages |
43 | for which a commitment to allocate from the pool has been made, but no | 44 | for which a commitment to allocate from the pool has been made, but no |
44 | allocation has yet been made. It's vaguely analogous to overcommit. | 45 | allocation has yet been made. It's vaguely analogous to overcommit. |
46 | HugePages_Surp is short for "surplus," and is the number of hugepages in | ||
47 | the pool above the value in /proc/sys/vm/nr_hugepages. The maximum | ||
48 | number of surplus hugepages is controlled by | ||
49 | /proc/sys/vm/nr_overcommit_hugepages. | ||
45 | 50 | ||
46 | /proc/filesystems should also show a filesystem of type "hugetlbfs" configured | 51 | /proc/filesystems should also show a filesystem of type "hugetlbfs" configured |
47 | in the kernel. | 52 | in the kernel. |
@@ -71,7 +76,25 @@ or failure of allocation depends on the amount of physically contiguous | |||
71 | memory that is preset in system at this time. System administrators may want | 76 | memory that is preset in system at this time. System administrators may want |
72 | to put this command in one of the local rc init files. This will enable the | 77 | to put this command in one of the local rc init files. This will enable the |
73 | kernel to request huge pages early in the boot process (when the possibility | 78 | kernel to request huge pages early in the boot process (when the possibility |
74 | of getting physical contiguous pages is still very high). | 79 | of getting physical contiguous pages is still very high). In either |
80 | case, adminstrators will want to verify the number of hugepages actually | ||
81 | allocated by checking the sysctl or meminfo. | ||
82 | |||
83 | /proc/sys/vm/nr_overcommit_hugepages indicates how large the pool of | ||
84 | hugepages can grow, if more hugepages than /proc/sys/vm/nr_hugepages are | ||
85 | requested by applications. echo'ing any non-zero value into this file | ||
86 | indicates that the hugetlb subsystem is allowed to try to obtain | ||
87 | hugepages from the buddy allocator, if the normal pool is exhausted. As | ||
88 | these surplus hugepages go out of use, they are freed back to the buddy | ||
89 | allocator. | ||
90 | |||
91 | Caveat: Shrinking the pool via nr_hugepages while a surplus is in effect | ||
92 | will allow the number of surplus huge pages to exceed the overcommit | ||
93 | value, as the pool hugepages (which must have been in use for a surplus | ||
94 | hugepages to be allocated) will become surplus hugepages. As long as | ||
95 | this condition holds, however, no more surplus huge pages will be | ||
96 | allowed on the system until one of the two sysctls are increased | ||
97 | sufficiently, or the surplus huge pages go out of use and are freed. | ||
75 | 98 | ||
76 | If the user applications are going to request hugepages using mmap system | 99 | If the user applications are going to request hugepages using mmap system |
77 | call, then it is required that system administrator mount a file system of | 100 | call, then it is required that system administrator mount a file system of |
@@ -94,8 +117,8 @@ provided on command line then no limits are set. For size and nr_inodes | |||
94 | options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For | 117 | options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For |
95 | example, size=2K has the same meaning as size=2048. | 118 | example, size=2K has the same meaning as size=2048. |
96 | 119 | ||
97 | read and write system calls are not supported on files that reside on hugetlb | 120 | While read system calls are supported on files that reside on hugetlb |
98 | file systems. | 121 | file systems, write system calls are not. |
99 | 122 | ||
100 | Regular chown, chgrp, and chmod commands (with right permissions) could be | 123 | Regular chown, chgrp, and chmod commands (with right permissions) could be |
101 | used to change the file attributes on hugetlbfs. | 124 | used to change the file attributes on hugetlbfs. |