Lines Matching refs:huge

21 Users can use the huge page support in Linux kernel by either using the mmap
30 persistent hugetlb pages in the kernel's huge page pool. It also displays
31 default huge page size and information about the number of free, reserved
32 and surplus huge pages in the pool of huge pages of default size.
33 The huge page size is needed for generating the proper alignment and
34 size of the arguments to system calls that map huge page regions.
48 is the size of the pool of huge pages.
50 is the number of huge pages in the pool that are not yet
53 is short for "reserved," and is the number of huge pages for
55 but no allocation has yet been made. Reserved huge pages
57 huge page from the pool of huge pages at fault time.
59 is short for "surplus," and is the number of huge pages in
61 maximum number of surplus huge pages is controlled by
66 is the total amount of memory (in kB), consumed by huge
68 If huge pages of different sizes are in use, this number
77 ``/proc/sys/vm/nr_hugepages`` indicates the current number of "persistent" huge
78 pages in the kernel's huge page pool. "Persistent" huge pages will be
79 returned to the huge page pool when freed by a task. A user with root
80 privileges can dynamically allocate more or free some persistent huge pages
83 Pages that are used as huge pages are reserved inside the kernel and cannot
87 Once a number of huge pages have been pre-allocated to the kernel huge page
89 or shared memory system calls to use the huge pages. See the discussion of
92 The administrator can allocate persistent huge pages on the kernel boot
94 number of huge pages requested. This is the most reliable method of
95 allocating huge pages as memory has not yet become fragmented.
97 Some platforms support multiple huge page sizes. To allocate huge pages
98 of a specific size, one must precede the huge pages boot command parameters
99 with a huge page size selection parameter "hugepagesz=<size>". <size> must
100 be specified in bytes with optional scale suffix [kKmMgG]. The default huge
106 Specify a huge page size. Used in conjunction with hugepages
107 parameter to preallocate a number of huge pages of the specified
114 specific huge page size. Valid huge page sizes are architecture
117 Specify the number of huge pages to preallocate. This typically
120 implicitly specifies the number of huge pages of default size to
121 allocate. If the number of huge pages of default size is implicitly
125 For example, on an architecture with 2M default huge page size::
129 will result in 256 2M huge pages being allocated and a warning message
134 Specify the default huge page size. This parameter can
137 specific number of huge pages of default size. The number of default
138 sized huge pages to preallocate can also be implicitly specified as
140 architecture with 2M default huge page size::
146 will all result in 256 2M huge pages being allocated. Valid default
147 huge page size is architecture dependent.
149 When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages``
150 indicates the current number of pre-allocated huge pages of the default size.
152 default sized persistent huge pages::
156 This command will try to adjust the number of default sized huge pages in the
157 huge page pool to 20, allocating or freeing huge pages, as required.
159 On a NUMA platform, the kernel will attempt to distribute the huge page pool
163 nodes with insufficient available, contiguous memory for a huge page will be
164 silently skipped when allocating persistent huge pages. See the
167 with the allocation and freeing of persistent huge pages.
169 The success or failure of huge page allocation depends on the amount of
171 allocation attempt. If the kernel is unable to allocate huge pages from
177 init files. This will enable the kernel to allocate huge pages early in
179 is still very high. Administrators can verify the number of huge pages
181 distribution of huge pages in a NUMA system, use::
186 huge pages can grow, if more huge pages than ``/proc/sys/vm/nr_hugepages`` are
189 number of "surplus" huge pages from the kernel's normal page pool, when the
190 persistent huge page pool is exhausted. As these surplus huge pages become
193 When increasing the huge page pool size via ``nr_hugepages``, any existing
194 surplus pages will first be promoted to persistent huge pages. Then, additional
195 huge pages will be allocated, if necessary and if possible, to fulfill
196 the new persistent huge page pool size.
198 The administrator may shrink the pool of persistent huge pages for
199 the default huge page size by setting the ``nr_hugepages`` sysctl to a
200 smaller value. The kernel will attempt to balance the freeing of huge pages
202 Any free huge pages on the selected nodes will be freed back to the kernel's
205 Caveat: Shrinking the persistent huge page pool via ``nr_hugepages`` such that
206 it becomes less than the number of huge pages in use will convert the balance
207 of the in-use huge pages to surplus huge pages. This will occur even if
210 increased sufficiently, or the surplus huge pages go out of use and are freed--
211 no more surplus huge pages will be allowed to be allocated.
213 With support for multiple huge page pools at run-time available, much of
214 the huge page userspace interface in ``/proc/sys/vm`` has been duplicated in
217 compatibility. The root huge page control directory in sysfs is::
221 For each huge page size supported by the running kernel, a subdirectory
235 which function as described above for the default huge page-sized case.
242 Whether huge pages are allocated and freed via the ``/proc`` interface or
244 NUMA nodes from which huge pages are allocated or freed are controlled by the
249 The recommended method to allocate or free huge pages to/from the kernel
250 huge page pool, using the ``nr_hugepages`` example above, is::
260 specified in <node-list>, depending on whether number of persistent huge pages
261 is initially less than or greater than 20, respectively. No huge pages will be
266 resulting effect on persistent huge page allocation is as follows:
270 persistent huge pages will be distributed across the node or nodes
273 memory for a huge page, the allocation will not "fallback" to the nearest
275 undesirable imbalance in the distribution of the huge page pool, or
276 possibly, allocation of persistent huge pages on nodes not allowed by
299 subset of the system nodes to allocate huge pages outside the cpuset
302 #. Boot-time huge page allocation attempts to distribute the requested number
303 of huge pages over all on-lines nodes with memory.
308 A subset of the contents of the root huge page control directory in sysfs,
314 Under this directory, the subdirectory for each supported huge page size
322 of free and surplus [overcommitted] huge pages, respectively, on the parent
325 The ``nr_hugepages`` attribute returns the total number of huge pages on the
326 specified node. When this attribute is written, the number of persistent huge
332 applied, from which node the huge page allocation will be attempted.
339 If the user applications are going to request huge pages using mmap system
345 min_size=<value>,nr_inodes=<value> none /mnt/huge
348 ``/mnt/huge``. Any file created on ``/mnt/huge`` uses huge pages.
357 If the platform supports multiple huge page sizes, the ``pagesize`` option can
358 be used to specify the huge page size and associated pool. ``pagesize``
360 default huge page size and associated pool will be used.
362 The ``size`` option sets the maximum value of memory (huge pages) allowed
363 for that filesystem (``/mnt/huge``). The ``size`` option can be specified
364 in bytes, or as a percentage of the specified huge page pool (``nr_hugepages``).
367 The ``min_size`` option sets the minimum value of memory (huge pages) allowed
369 either bytes or a percentage of the huge page pool.
370 At mount time, the number of huge pages specified by ``min_size`` are reserved
372 If there are not enough free huge pages available, the mount will fail.
373 As huge pages are allocated to the filesystem and freed, the reserve count
374 is adjusted so that the sum of allocated and reserved huge pages is always
377 The option ``nr_inodes`` sets the maximum number of inodes that ``/mnt/huge``
426 to help with huge page usability, environment setup, and control.