Lines Matching full:huge
19 Users can use the huge page support in Linux kernel by either using the mmap
28 persistent hugetlb pages in the kernel's huge page pool. It also displays
29 default huge page size and information about the number of free, reserved
30 and surplus huge pages in the pool of huge pages of default size.
31 The huge page size is needed for generating the proper alignment and
32 size of the arguments to system calls that map huge page regions.
46 is the size of the pool of huge pages.
48 is the number of huge pages in the pool that are not yet
51 is short for "reserved," and is the number of huge pages for
53 but no allocation has yet been made. Reserved huge pages
55 huge page from the pool of huge pages at fault time.
57 is short for "surplus," and is the number of huge pages in
59 maximum number of surplus huge pages is controlled by
62 with each hugetlb page is enabled, the number of surplus huge pages
63 may be temporarily larger than the maximum number of surplus huge
68 is the total amount of memory (in kB), consumed by huge
70 If huge pages of different sizes are in use, this number
79 ``/proc/sys/vm/nr_hugepages`` indicates the current number of "persistent" huge
80 pages in the kernel's huge page pool. "Persistent" huge pages will be
81 returned to the huge page pool when freed by a task. A user with root
82 privileges can dynamically allocate more or free some persistent huge pages
86 hugetlb page is enabled, we can fail to free the huge pages triggered by
89 Pages that are used as huge pages are reserved inside the kernel and cannot
90 be used for other purposes. Huge pages cannot be swapped out under
93 Once a number of huge pages have been pre-allocated to the kernel huge page
95 or shared memory system calls to use the huge pages. See the discussion of
96 :ref:`Using Huge Pages <using_huge_pages>`, below.
98 The administrator can allocate persistent huge pages on the kernel boot
100 number of huge pages requested. This is the most reliable method of
101 allocating huge pages as memory has not yet become fragmented.
103 Some platforms support multiple huge page sizes. To allocate huge pages
104 of a specific size, one must precede the huge pages boot command parameters
105 with a huge page size selection parameter "hugepagesz=<size>". <size> must
106 be specified in bytes with optional scale suffix [kKmMgG]. The default huge
112 Specify a huge page size. Used in conjunction with hugepages
113 parameter to preallocate a number of huge pages of the specified
120 specific huge page size. Valid huge page sizes are architecture
123 Specify the number of huge pages to preallocate. This typically
126 implicitly specifies the number of huge pages of default size to
127 allocate. If the number of huge pages of default size is implicitly
130 node format. The node format specifies the number of huge pages
133 For example, on an architecture with 2M default huge page size::
137 will result in 256 2M huge pages being allocated and a warning message
150 Specify the default huge page size. This parameter can
153 specific number of huge pages of default size. The number of default
154 sized huge pages to preallocate can also be implicitly specified as
156 architecture with 2M default huge page size::
162 will all result in 256 2M huge pages being allocated. Valid default
163 huge page size is architecture dependent.
168 When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages``
169 indicates the current number of pre-allocated huge pages of the default size.
171 default sized persistent huge pages::
175 This command will try to adjust the number of default sized huge pages in the
176 huge page pool to 20, allocating or freeing huge pages, as required.
178 On a NUMA platform, the kernel will attempt to distribute the huge page pool
182 nodes with insufficient available, contiguous memory for a huge page will be
183 silently skipped when allocating persistent huge pages. See the
186 with the allocation and freeing of persistent huge pages.
188 The success or failure of huge page allocation depends on the amount of
190 allocation attempt. If the kernel is unable to allocate huge pages from
196 init files. This will enable the kernel to allocate huge pages early in
198 is still very high. Administrators can verify the number of huge pages
200 distribution of huge pages in a NUMA system, use::
202 cat /sys/devices/system/node/node*/meminfo | fgrep Huge
205 huge pages can grow, if more huge pages than ``/proc/sys/vm/nr_hugepages`` are
208 number of "surplus" huge pages from the kernel's normal page pool, when the
209 persistent huge page pool is exhausted. As these surplus huge pages become
212 When increasing the huge page pool size via ``nr_hugepages``, any existing
213 surplus pages will first be promoted to persistent huge pages. Then, additional
214 huge pages will be allocated, if necessary and if possible, to fulfill
215 the new persistent huge page pool size.
217 The administrator may shrink the pool of persistent huge pages for
218 the default huge page size by setting the ``nr_hugepages`` sysctl to a
219 smaller value. The kernel will attempt to balance the freeing of huge pages
221 Any free huge pages on the selected nodes will be freed back to the kernel's
224 Caveat: Shrinking the persistent huge page pool via ``nr_hugepages`` such that
225 it becomes less than the number of huge pages in use will convert the balance
226 of the in-use huge pages to surplus huge pages. This will occur even if
229 increased sufficiently, or the surplus huge pages go out of use and are freed--
230 no more surplus huge pages will be allowed to be allocated.
232 With support for multiple huge page pools at run-time available, much of
233 the huge page userspace interface in ``/proc/sys/vm`` has been duplicated in
236 compatibility. The root huge page control directory in sysfs is::
240 For each huge page size supported by the running kernel, a subdirectory
246 will exist. In addition, two additional interfaces for demoting huge
258 The demote interfaces provide the ability to split a huge page into
259 smaller huge pages. For example, the x86 architecture supports both
260 1GB and 2MB huge pages sizes. A 1GB huge page can be split into 512
261 2MB huge pages. Demote interfaces are not available for the smallest
262 huge page size. The demote interfaces are:
266 number of huge pages of demote_size will be created. By default,
267 demote_size is set to the next smaller huge page size. If there are
268 multiple smaller huge page sizes, demote_size can be set to any of
269 these smaller sizes. Only huge page sizes less than the current huge
273 is used to demote a number of huge pages. A user with root privileges
275 requested number of huge pages. To determine how many pages were
280 demote_size) function as described above for the default huge page-sized case.
284 Interaction of Task Memory Policy with Huge Page Allocation/Freeing
287 Whether huge pages are allocated and freed via the ``/proc`` interface or
289 NUMA nodes from which huge pages are allocated or freed are controlled by the
294 The recommended method to allocate or free huge pages to/from the kernel
295 huge page pool, using the ``nr_hugepages`` example above, is::
305 specified in <node-list>, depending on whether number of persistent huge pages
306 is initially less than or greater than 20, respectively. No huge pages will be
311 resulting effect on persistent huge page allocation is as follows:
315 persistent huge pages will be distributed across the node or nodes
318 memory for a huge page, the allocation will not "fallback" to the nearest
320 undesirable imbalance in the distribution of the huge page pool, or
321 possibly, allocation of persistent huge pages on nodes not allowed by
344 subset of the system nodes to allocate huge pages outside the cpuset
347 #. Boot-time huge page allocation attempts to distribute the requested number
348 of huge pages over all on-lines nodes with memory.
353 A subset of the contents of the root huge page control directory in sysfs,
359 Under this directory, the subdirectory for each supported huge page size
367 of free and surplus [overcommitted] huge pages, respectively, on the parent
370 The ``nr_hugepages`` attribute returns the total number of huge pages on the
371 specified node. When this attribute is written, the number of persistent huge
377 applied, from which node the huge page allocation will be attempted.
381 Using Huge Pages
384 If the user applications are going to request huge pages using mmap system
390 min_size=<value>,nr_inodes=<value> none /mnt/huge
393 ``/mnt/huge``. Any file created on ``/mnt/huge`` uses huge pages.
402 If the platform supports multiple huge page sizes, the ``pagesize`` option can
403 be used to specify the huge page size and associated pool. ``pagesize``
405 default huge page size and associated pool will be used.
407 The ``size`` option sets the maximum value of memory (huge pages) allowed
408 for that filesystem (``/mnt/huge``). The ``size`` option can be specified
409 in bytes, or as a percentage of the specified huge page pool (``nr_hugepages``).
412 The ``min_size`` option sets the minimum value of memory (huge pages) allowed
414 either bytes or a percentage of the huge page pool.
415 At mount time, the number of huge pages specified by ``min_size`` are reserved
417 If there are not enough free huge pages available, the mount will fail.
418 As huge pages are allocated to the filesystem and freed, the reserve count
419 is adjusted so that the sum of allocated and reserved huge pages is always
422 The option ``nr_inodes`` sets the maximum number of inodes that ``/mnt/huge``
471 to help with huge page usability, environment setup, and control.