Esphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/pt_BR/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/admin-guide/mm/hugetlbpagemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h HugeTLB Pagesh]h HugeTLB Pages}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/admin-guide/mm/hugetlbpage.rsthKubh)}(hhh](h)}(hOverviewh]hOverview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe intent of this file is to give a brief summary of hugetlbpage support in the Linux kernel. This support is built on top of multiple page size support that is provided by most modern architectures. For example, x86 CPUs normally support 4K and 2M (1G if architecturally supported) page sizes, ia64 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical translations. Typically this is a very scarce resource on processor. Operating systems try to make best use of limited number of TLB resources. This optimization is more critical now as bigger and bigger physical memories (several GBs) are more readily available.h]hXThe intent of this file is to give a brief summary of hugetlbpage support in the Linux kernel. This support is built on top of multiple page size support that is provided by most modern architectures. For example, x86 CPUs normally support 4K and 2M (1G if architecturally supported) page sizes, ia64 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M, 256M and ppc64 supports 4K and 16M. A TLB is a cache of virtual-to-physical translations. Typically this is a very scarce resource on processor. Operating systems try to make best use of limited number of TLB resources. This optimization is more critical now as bigger and bigger physical memories (several GBs) are more readily available.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hUsers can use the huge page support in Linux kernel by either using the mmap system call or standard SYSV shared memory system calls (shmget, shmat).h]hUsers can use the huge page support in Linux kernel by either using the mmap system call or standard SYSV shared memory system calls (shmget, shmat).}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hFirst the Linux kernel needs to be built with the CONFIG_HUGETLBFS (present under "File systems") and CONFIG_HUGETLB_PAGE (selected automatically when CONFIG_HUGETLBFS is selected) configuration options.h]hFirst the Linux kernel needs to be built with the CONFIG_HUGETLBFS (present under “File systems”) and CONFIG_HUGETLB_PAGE (selected automatically when CONFIG_HUGETLBFS is selected) configuration options.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe ``/proc/meminfo`` file provides information about the total number of persistent hugetlb pages in the kernel's huge page pool. It also displays default huge page size and information about the number of free, reserved and surplus huge pages in the pool of huge pages of default size. The huge page size is needed for generating the proper alignment and size of the arguments to system calls that map huge page regions.h](hThe }(hjhhhNhNubhliteral)}(h``/proc/meminfo``h]h /proc/meminfo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX file provides information about the total number of persistent hugetlb pages in the kernel’s huge page pool. It also displays default huge page size and information about the number of free, reserved and surplus huge pages in the pool of huge pages of default size. The huge page size is needed for generating the proper alignment and size of the arguments to system calls that map huge page regions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h=The output of ``cat /proc/meminfo`` will include lines like::h](hThe output of }(hj*hhhNhNubj)}(h``cat /proc/meminfo``h]hcat /proc/meminfo}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh will include lines like:}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hhhhubh literal_block)}(hHugePages_Total: uuu HugePages_Free: vvv HugePages_Rsvd: www HugePages_Surp: xxx Hugepagesize: yyy kB Hugetlb: zzz kBh]hHugePages_Total: uuu HugePages_Free: vvv HugePages_Rsvd: www HugePages_Surp: xxx Hugepagesize: yyy kB Hugetlb: zzz kB}hjLsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jJhhhK$hhhhubh)}(hwhere:h]hwhere:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubhdefinition_list)}(hhh](hdefinition_list_item)}(h6HugePages_Total is the size of the pool of huge pages.h](hterm)}(hHugePages_Totalh]hHugePages_Total}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhK-hjqubh definition)}(hhh]h)}(h&is the size of the pool of huge pages.h]h&is the size of the pool of huge pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1johhhK-hjlubjp)}(hRHugePages_Free is the number of huge pages in the pool that are not yet allocated.h](jv)}(hHugePages_Freeh]hHugePages_Free}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhK0hjubj)}(hhh]h)}(hCis the number of huge pages in the pool that are not yet allocated.h]hCis the number of huge pages in the pool that are not yet allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhK0hjlhhubjp)}(hX/HugePages_Rsvd is short for "reserved," and is the number of huge pages for which a commitment to allocate from the pool has been made, but no allocation has yet been made. Reserved huge pages guarantee that an application will be able to allocate a huge page from the pool of huge pages at fault time.h](jv)}(hHugePages_Rsvdh]hHugePages_Rsvd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhK6hjubj)}(hhh]h)}(hX is short for "reserved," and is the number of huge pages for which a commitment to allocate from the pool has been made, but no allocation has yet been made. Reserved huge pages guarantee that an application will be able to allocate a huge page from the pool of huge pages at fault time.h]hX$is short for “reserved,” and is the number of huge pages for which a commitment to allocate from the pool has been made, but no allocation has yet been made. Reserved huge pages guarantee that an application will be able to allocate a huge page from the pool of huge pages at fault time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhK6hjlhhubjp)}(hXHugePages_Surp is short for "surplus," and is the number of huge pages in the pool above the value in ``/proc/sys/vm/nr_hugepages``. The maximum number of surplus huge pages is controlled by ``/proc/sys/vm/nr_overcommit_hugepages``. Note: When the feature of freeing unused vmemmap pages associated with each hugetlb page is enabled, the number of surplus huge pages may be temporarily larger than the maximum number of surplus huge pages when the system is under memory pressure.h](jv)}(hHugePages_Surph]hHugePages_Surp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhK?hjubj)}(hhh]h)}(hXis short for "surplus," and is the number of huge pages in the pool above the value in ``/proc/sys/vm/nr_hugepages``. The maximum number of surplus huge pages is controlled by ``/proc/sys/vm/nr_overcommit_hugepages``. Note: When the feature of freeing unused vmemmap pages associated with each hugetlb page is enabled, the number of surplus huge pages may be temporarily larger than the maximum number of surplus huge pages when the system is under memory pressure.h](h[is short for “surplus,” and is the number of huge pages in the pool above the value in }(hjhhhNhNubj)}(h``/proc/sys/vm/nr_hugepages``h]h/proc/sys/vm/nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh<. The maximum number of surplus huge pages is controlled by }(hjhhhNhNubj)}(h(``/proc/sys/vm/nr_overcommit_hugepages``h]h$/proc/sys/vm/nr_overcommit_hugepages}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Note: When the feature of freeing unused vmemmap pages associated with each hugetlb page is enabled, the number of surplus huge pages may be temporarily larger than the maximum number of surplus huge pages when the system is under memory pressure.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhK?hjlhhubjp)}(h2Hugepagesize is the default hugepage size (in kB).h](jv)}(h Hugepagesizeh]h Hugepagesize}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKAhjUubj)}(hhh]h)}(h%is the default hugepage size (in kB).h]h%is the default hugepage size (in kB).}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjgubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1johhhKAhjlhhubjp)}(hXHugetlb is the total amount of memory (in kB), consumed by huge pages of all sizes. If huge pages of different sizes are in use, this number will exceed HugePages_Total \* Hugepagesize. To get more detailed information, please, refer to ``/sys/kernel/mm/hugepages`` (described below). h](jv)}(hHugetlbh]hHugetlb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKJhjubj)}(hhh]h)}(hXis the total amount of memory (in kB), consumed by huge pages of all sizes. If huge pages of different sizes are in use, this number will exceed HugePages_Total \* Hugepagesize. To get more detailed information, please, refer to ``/sys/kernel/mm/hugepages`` (described below).h](his the total amount of memory (in kB), consumed by huge pages of all sizes. If huge pages of different sizes are in use, this number will exceed HugePages_Total * Hugepagesize. To get more detailed information, please, refer to }(hjhhhNhNubj)}(h``/sys/kernel/mm/hugepages``h]h/sys/kernel/mm/hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (described below).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhKJhjlhhubeh}(h]h ]h"]h$]h&]uh1jjhhhhhhhNubh)}(ha``/proc/filesystems`` should also show a filesystem of type "hugetlbfs" configured in the kernel.h](j)}(h``/proc/filesystems``h]h/proc/filesystems}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhP should also show a filesystem of type “hugetlbfs” configured in the kernel.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhhhhubh)}(hXd``/proc/sys/vm/nr_hugepages`` indicates the current number of "persistent" huge pages in the kernel's huge page pool. "Persistent" huge pages will be returned to the huge page pool when freed by a task. A user with root privileges can dynamically allocate more or free some persistent huge pages by increasing or decreasing the value of ``nr_hugepages``.h](j)}(h``/proc/sys/vm/nr_hugepages``h]h/proc/sys/vm/nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX@ indicates the current number of “persistent” huge pages in the kernel’s huge page pool. “Persistent” huge pages will be returned to the huge page pool when freed by a task. A user with root privileges can dynamically allocate more or free some persistent huge pages by increasing or decreasing the value of }(hjhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhhhhubh)}(hNote: When the feature of freeing unused vmemmap pages associated with each hugetlb page is enabled, we can fail to free the huge pages triggered by the user when the system is under memory pressure. Please try again later.h]hNote: When the feature of freeing unused vmemmap pages associated with each hugetlb page is enabled, we can fail to free the huge pages triggered by the user when the system is under memory pressure. Please try again later.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhhhhubh)}(hPages that are used as huge pages are reserved inside the kernel and cannot be used for other purposes. Huge pages cannot be swapped out under memory pressure.h]hPages that are used as huge pages are reserved inside the kernel and cannot be used for other purposes. Huge pages cannot be swapped out under memory pressure.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhhhhubh)}(hXOnce a number of huge pages have been pre-allocated to the kernel huge page pool, a user with appropriate privilege can use either the mmap system call or shared memory system calls to use the huge pages. See the discussion of :ref:`Using Huge Pages `, below.h](hOnce a number of huge pages have been pre-allocated to the kernel huge page pool, a user with appropriate privilege can use either the mmap system call or shared memory system calls to use the huge pages. See the discussion of }(hj1hhhNhNubh)}(h*:ref:`Using Huge Pages `h]hinline)}(hj;h]hUsing Huge Pages}(hj?hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j=hj9ubah}(h]h ]h"]h$]h&]refdocadmin-guide/mm/hugetlbpage refdomainjJreftyperef refexplicitrefwarn reftargetusing_huge_pagesuh1hhhhK]hj1ubh, below.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hhhhubh)}(hXThe administrator can allocate persistent huge pages on the kernel boot command line by specifying the "hugepages=N" parameter, where 'N' = the number of huge pages requested. This is the most reliable method of allocating huge pages as memory has not yet become fragmented.h]hXThe administrator can allocate persistent huge pages on the kernel boot command line by specifying the “hugepages=N” parameter, where ‘N’ = the number of huge pages requested. This is the most reliable method of allocating huge pages as memory has not yet become fragmented.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhhhhubh)}(hX|Some platforms support multiple huge page sizes. To allocate huge pages of a specific size, one must precede the huge pages boot command parameters with a huge page size selection parameter "hugepagesz=". must be specified in bytes with optional scale suffix [kKmMgG]. The default huge page size may be selected with the "default_hugepagesz=" boot parameter.h]hXSome platforms support multiple huge page sizes. To allocate huge pages of a specific size, one must precede the huge pages boot command parameters with a huge page size selection parameter “hugepagesz=”. must be specified in bytes with optional scale suffix [kKmMgG]. The default huge page size may be selected with the “default_hugepagesz=” boot parameter.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghhhhubh)}(h-Hugetlb boot command line parameter semanticsh]h-Hugetlb boot command line parameter semantics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhhhhubjk)}(hhh](jp)}(hXhugepagesz Specify a huge page size. Used in conjunction with hugepages parameter to preallocate a number of huge pages of the specified size. Hence, hugepagesz and hugepages are typically specified in pairs such as:: hugepagesz=2M hugepages=512 hugepagesz can only be specified once on the command line for a specific huge page size. Valid huge page sizes are architecture dependent.h](jv)}(h hugepageszh]h hugepagesz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKxhjubj)}(hhh](h)}(hSpecify a huge page size. Used in conjunction with hugepages parameter to preallocate a number of huge pages of the specified size. Hence, hugepagesz and hugepages are typically specified in pairs such as::h]hSpecify a huge page size. Used in conjunction with hugepages parameter to preallocate a number of huge pages of the specified size. Hence, hugepagesz and hugepages are typically specified in pairs such as:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubjK)}(hhugepagesz=2M hugepages=512h]hhugepagesz=2M hugepages=512}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKuhjubh)}(hhugepagesz can only be specified once on the command line for a specific huge page size. Valid huge page sizes are architecture dependent.h]hhugepagesz can only be specified once on the command line for a specific huge page size. Valid huge page sizes are architecture dependent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhKxhjubjp)}(hXQhugepages Specify the number of huge pages to preallocate. This typically follows a valid hugepagesz or default_hugepagesz parameter. However, if hugepages is the first or only hugetlb command line parameter it implicitly specifies the number of huge pages of default size to allocate. If the number of huge pages of default size is implicitly specified, it can not be overwritten by a hugepagesz,hugepages parameter pair for the default size. This parameter also has a node format. The node format specifies the number of huge pages to allocate on specific nodes. For example, on an architecture with 2M default huge page size:: hugepages=256 hugepagesz=2M hugepages=512 will result in 256 2M huge pages being allocated and a warning message indicating that the hugepages=512 parameter is ignored. If a hugepages parameter is preceded by an invalid hugepagesz parameter, it will be ignored. Node format example:: hugepagesz=2M hugepages=0:1,1:2 It will allocate 1 2M hugepage on node0 and 2 2M hugepages on node1. If the node number is invalid, the parameter will be ignored.h](jv)}(h hugepagesh]h hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKhjubj)}(hhh](h)}(hX/Specify the number of huge pages to preallocate. This typically follows a valid hugepagesz or default_hugepagesz parameter. However, if hugepages is the first or only hugetlb command line parameter it implicitly specifies the number of huge pages of default size to allocate. If the number of huge pages of default size is implicitly specified, it can not be overwritten by a hugepagesz,hugepages parameter pair for the default size. This parameter also has a node format. The node format specifies the number of huge pages to allocate on specific nodes.h]hX/Specify the number of huge pages to preallocate. This typically follows a valid hugepagesz or default_hugepagesz parameter. However, if hugepages is the first or only hugetlb command line parameter it implicitly specifies the number of huge pages of default size to allocate. If the number of huge pages of default size is implicitly specified, it can not be overwritten by a hugepagesz,hugepages parameter pair for the default size. This parameter also has a node format. The node format specifies the number of huge pages to allocate on specific nodes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubh)}(h@For example, on an architecture with 2M default huge page size::h]h?For example, on an architecture with 2M default huge page size:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjK)}(h)hugepages=256 hugepagesz=2M hugepages=512h]h)hugepages=256 hugepagesz=2M hugepages=512}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhjubh)}(hwill result in 256 2M huge pages being allocated and a warning message indicating that the hugepages=512 parameter is ignored. If a hugepages parameter is preceded by an invalid hugepagesz parameter, it will be ignored.h]hwill result in 256 2M huge pages being allocated and a warning message indicating that the hugepages=512 parameter is ignored. If a hugepages parameter is preceded by an invalid hugepagesz parameter, it will be ignored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hNode format example::h]hNode format example:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjK)}(hhugepagesz=2M hugepages=0:1,1:2h]hhugepagesz=2M hugepages=0:1,1:2}hj;sbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhjubh)}(hIt will allocate 1 2M hugepage on node0 and 2 2M hugepages on node1. If the node number is invalid, the parameter will be ignored.h]hIt will allocate 1 2M hugepage on node0 and 2 2M hugepages on node1. If the node number is invalid, the parameter will be ignored.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhKhjhhubjp)}(hXhugepage_alloc_threads Specify the number of threads that should be used to allocate hugepages during boot. This parameter can be used to improve system bootup time when allocating a large amount of huge pages. The default value is 25% of the available hardware threads. Example to use 8 allocation threads:: hugepage_alloc_threads=8 Note that this parameter only applies to non-gigantic huge pages.h](jv)}(hhugepage_alloc_threadsh]hhugepage_alloc_threads}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKhjcubj)}(hhh](h)}(hSpecify the number of threads that should be used to allocate hugepages during boot. This parameter can be used to improve system bootup time when allocating a large amount of huge pages.h]hSpecify the number of threads that should be used to allocate hugepages during boot. This parameter can be used to improve system bootup time when allocating a large amount of huge pages.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubh)}(haThe default value is 25% of the available hardware threads. Example to use 8 allocation threads::h]h`The default value is 25% of the available hardware threads. Example to use 8 allocation threads:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubjK)}(hhugepage_alloc_threads=8h]hhugepage_alloc_threads=8}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhjuubh)}(hANote that this parameter only applies to non-gigantic huge pages.h]hANote that this parameter only applies to non-gigantic huge pages.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubeh}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1johhhKhjhhubjp)}(hXdefault_hugepagesz Specify the default huge page size. This parameter can only be specified once on the command line. default_hugepagesz can optionally be followed by the hugepages parameter to preallocate a specific number of huge pages of default size. The number of default sized huge pages to preallocate can also be implicitly specified as mentioned in the hugepages section above. Therefore, on an architecture with 2M default huge page size:: hugepages=256 default_hugepagesz=2M hugepages=256 hugepages=256 default_hugepagesz=2M will all result in 256 2M huge pages being allocated. Valid default huge page size is architecture dependent.h](jv)}(hdefault_hugepageszh]hdefault_hugepagesz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKhjubj)}(hhh](h)}(hXSpecify the default huge page size. This parameter can only be specified once on the command line. default_hugepagesz can optionally be followed by the hugepages parameter to preallocate a specific number of huge pages of default size. The number of default sized huge pages to preallocate can also be implicitly specified as mentioned in the hugepages section above. Therefore, on an architecture with 2M default huge page size::h]hXSpecify the default huge page size. This parameter can only be specified once on the command line. default_hugepagesz can optionally be followed by the hugepages parameter to preallocate a specific number of huge pages of default size. The number of default sized huge pages to preallocate can also be implicitly specified as mentioned in the hugepages section above. Therefore, on an architecture with 2M default huge page size:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjK)}(hUhugepages=256 default_hugepagesz=2M hugepages=256 hugepages=256 default_hugepagesz=2Mh]hUhugepages=256 default_hugepagesz=2M hugepages=256 hugepages=256 default_hugepagesz=2M}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhjubh)}(hnwill all result in 256 2M huge pages being allocated. Valid default huge page size is architecture dependent.h]hnwill all result in 256 2M huge pages being allocated. Valid default huge page size is architecture dependent.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhKhjhhubjp)}(hxhugetlb_free_vmemmap When CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is set, this enables HugeTLB Vmemmap Optimization (HVO). h](jv)}(hhugetlb_free_vmemmaph]hhugetlb_free_vmemmap}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhKhjubj)}(hhh]h)}(hbWhen CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is set, this enables HugeTLB Vmemmap Optimization (HVO).h]hbWhen CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is set, this enables HugeTLB Vmemmap Optimization (HVO).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1johhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jjhhhhhhhNubh)}(hX When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages`` indicates the current number of pre-allocated huge pages of the default size. Thus, one can use the following command to dynamically allocate/deallocate default sized persistent huge pages::h](h-When multiple huge page sizes are supported, }(hj<hhhNhNubj)}(h``/proc/sys/vm/nr_hugepages``h]h/proc/sys/vm/nr_hugepages}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh indicates the current number of pre-allocated huge pages of the default size. Thus, one can use the following command to dynamically allocate/deallocate default sized persistent huge pages:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjK)}(h#echo 20 > /proc/sys/vm/nr_hugepagesh]h#echo 20 > /proc/sys/vm/nr_hugepages}hj\sbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhhhhubh)}(hThis command will try to adjust the number of default sized huge pages in the huge page pool to 20, allocating or freeing huge pages, as required.h]hThis command will try to adjust the number of default sized huge pages in the huge page pool to 20, allocating or freeing huge pages, as required.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXyOn a NUMA platform, the kernel will attempt to distribute the huge page pool over all the set of allowed nodes specified by the NUMA memory policy of the task that modifies ``nr_hugepages``. The default for the allowed nodes--when the task has default memory policy--is all on-line nodes with memory. Allowed nodes with insufficient available, contiguous memory for a huge page will be silently skipped when allocating persistent huge pages. See the :ref:`discussion below ` of the interaction of task memory policy, cpusets and per node attributes with the allocation and freeing of persistent huge pages.h](hOn a NUMA platform, the kernel will attempt to distribute the huge page pool over all the set of allowed nodes specified by the NUMA memory policy of the task that modifies }(hjxhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubhX. The default for the allowed nodes--when the task has default memory policy--is all on-line nodes with memory. Allowed nodes with insufficient available, contiguous memory for a huge page will be silently skipped when allocating persistent huge pages. See the }(hjxhhhNhNubh)}(h1:ref:`discussion below `h]j>)}(hjh]hdiscussion below}(hjhhhNhNubah}(h]h ](jIstdstd-refeh"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]refdocjV refdomainjreftyperef refexplicitrefwarnj\mem_policy_and_hp_allocuh1hhhhKhjxubh of the interaction of task memory policy, cpusets and per node attributes with the allocation and freeing of persistent huge pages.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe success or failure of huge page allocation depends on the amount of physically contiguous memory that is present in system at the time of the allocation attempt. If the kernel is unable to allocate huge pages from some nodes in a NUMA system, it will attempt to make up the difference by allocating extra pages on other nodes with sufficient available contiguous memory, if any.h]hXThe success or failure of huge page allocation depends on the amount of physically contiguous memory that is present in system at the time of the allocation attempt. If the kernel is unable to allocate huge pages from some nodes in a NUMA system, it will attempt to make up the difference by allocating extra pages on other nodes with sufficient available contiguous memory, if any.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXSystem administrators may want to put this command in one of the local rc init files. This will enable the kernel to allocate huge pages early in the boot process when the possibility of getting physical contiguous pages is still very high. Administrators can verify the number of huge pages actually allocated by checking the sysctl or meminfo. To check the per node distribution of huge pages in a NUMA system, use::h]hXSystem administrators may want to put this command in one of the local rc init files. This will enable the kernel to allocate huge pages early in the boot process when the possibility of getting physical contiguous pages is still very high. Administrators can verify the number of huge pages actually allocated by checking the sysctl or meminfo. To check the per node distribution of huge pages in a NUMA system, use:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjK)}(h7cat /sys/devices/system/node/node*/meminfo | fgrep Hugeh]h7cat /sys/devices/system/node/node*/meminfo | fgrep Huge}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhhhhubh)}(hX``/proc/sys/vm/nr_overcommit_hugepages`` specifies how large the pool of huge pages can grow, if more huge pages than ``/proc/sys/vm/nr_hugepages`` are requested by applications. Writing any non-zero value into this file indicates that the hugetlb subsystem is allowed to try to obtain that number of "surplus" huge pages from the kernel's normal page pool, when the persistent huge page pool is exhausted. As these surplus huge pages become unused, they are freed back to the kernel's normal page pool.h](j)}(h(``/proc/sys/vm/nr_overcommit_hugepages``h]h$/proc/sys/vm/nr_overcommit_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhN specifies how large the pool of huge pages can grow, if more huge pages than }(hjhhhNhNubj)}(h``/proc/sys/vm/nr_hugepages``h]h/proc/sys/vm/nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhXm are requested by applications. Writing any non-zero value into this file indicates that the hugetlb subsystem is allowed to try to obtain that number of “surplus” huge pages from the kernel’s normal page pool, when the persistent huge page pool is exhausted. As these surplus huge pages become unused, they are freed back to the kernel’s normal page pool.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX When increasing the huge page pool size via ``nr_hugepages``, any existing surplus pages will first be promoted to persistent huge pages. Then, additional huge pages will be allocated, if necessary and if possible, to fulfill the new persistent huge page pool size.h](h,When increasing the huge page pool size via }(hjhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, any existing surplus pages will first be promoted to persistent huge pages. Then, additional huge pages will be allocated, if necessary and if possible, to fulfill the new persistent huge page pool size.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe administrator may shrink the pool of persistent huge pages for the default huge page size by setting the ``nr_hugepages`` sysctl to a smaller value. The kernel will attempt to balance the freeing of huge pages across all nodes in the memory policy of the task modifying ``nr_hugepages``. Any free huge pages on the selected nodes will be freed back to the kernel's normal page pool.h](hmThe administrator may shrink the pool of persistent huge pages for the default huge page size by setting the }(hj4hhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh sysctl to a smaller value. The kernel will attempt to balance the freeing of huge pages across all nodes in the memory policy of the task modifying }(hj4hhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubhb. Any free huge pages on the selected nodes will be freed back to the kernel’s normal page pool.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX Caveat: Shrinking the persistent huge page pool via ``nr_hugepages`` such that it becomes less than the number of huge pages in use will convert the balance of the in-use huge pages to surplus huge pages. This will occur even if the number of surplus pages would exceed the overcommit value. As long as this condition holds--that is, until ``nr_hugepages+nr_overcommit_hugepages`` is increased sufficiently, or the surplus huge pages go out of use and are freed-- no more surplus huge pages will be allowed to be allocated.h](h4Caveat: Shrinking the persistent huge page pool via }(hjfhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubhX such that it becomes less than the number of huge pages in use will convert the balance of the in-use huge pages to surplus huge pages. This will occur even if the number of surplus pages would exceed the overcommit value. As long as this condition holds--that is, until }(hjfhhhNhNubj)}(h(``nr_hugepages+nr_overcommit_hugepages``h]h$nr_hugepages+nr_overcommit_hugepages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubh is increased sufficiently, or the surplus huge pages go out of use and are freed-- no more surplus huge pages will be allowed to be allocated.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX(With support for multiple huge page pools at run-time available, much of the huge page userspace interface in ``/proc/sys/vm`` has been duplicated in sysfs. The ``/proc`` interfaces discussed above have been retained for backwards compatibility. The root huge page control directory in sysfs is::h](hnWith support for multiple huge page pools at run-time available, much of the huge page userspace interface in }(hjhhhNhNubj)}(h``/proc/sys/vm``h]h /proc/sys/vm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh# has been duplicated in sysfs. The }(hjhhhNhNubj)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh} interfaces discussed above have been retained for backwards compatibility. The root huge page control directory in sysfs is:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjK)}(h/sys/kernel/mm/hugepagesh]h/sys/kernel/mm/hugepages}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhhhhubh)}(haFor each huge page size supported by the running kernel, a subdirectory will exist, of the form::h]h`For each huge page size supported by the running kernel, a subdirectory will exist, of the form:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjK)}(hhugepages-${size}kBh]hhugepages-${size}kB}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhKhhhhubh)}(hInside each of these directories, the set of files contained in ``/proc`` will exist. In addition, two additional interfaces for demoting huge pages may exist::h](h@Inside each of these directories, the set of files contained in }(hjhhhNhNubj)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhW will exist. In addition, two additional interfaces for demoting huge pages may exist:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjK)}(h~demote demote_size nr_hugepages nr_hugepages_mempolicy nr_overcommit_hugepages free_hugepages resv_hugepages surplus_hugepagesh]h~demote demote_size nr_hugepages nr_hugepages_mempolicy nr_overcommit_hugepages free_hugepages resv_hugepages surplus_hugepages}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhMhhhhubh)}(hX?The demote interfaces provide the ability to split a huge page into smaller huge pages. For example, the x86 architecture supports both 1GB and 2MB huge pages sizes. A 1GB huge page can be split into 512 2MB huge pages. Demote interfaces are not available for the smallest huge page size. The demote interfaces are:h]hX?The demote interfaces provide the ability to split a huge page into smaller huge pages. For example, the x86 architecture supports both 1GB and 2MB huge pages sizes. A 1GB huge page can be split into 512 2MB huge pages. Demote interfaces are not available for the smallest huge page size. The demote interfaces are:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hhhhubjk)}(hhh](jp)}(hXzdemote_size is the size of demoted pages. When a page is demoted a corresponding number of huge pages of demote_size will be created. By default, demote_size is set to the next smaller huge page size. If there are multiple smaller huge page sizes, demote_size can be set to any of these smaller sizes. Only huge page sizes less than the current huge pages size are allowed. h](jv)}(h demote_sizeh]h demote_size}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhMhj3ubj)}(hhh]h)}(hXmis the size of demoted pages. When a page is demoted a corresponding number of huge pages of demote_size will be created. By default, demote_size is set to the next smaller huge page size. If there are multiple smaller huge page sizes, demote_size can be set to any of these smaller sizes. Only huge page sizes less than the current huge pages size are allowed.h]hXmis the size of demoted pages. When a page is demoted a corresponding number of huge pages of demote_size will be created. By default, demote_size is set to the next smaller huge page size. If there are multiple smaller huge page sizes, demote_size can be set to any of these smaller sizes. Only huge page sizes less than the current huge pages size are allowed.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1johhhMhj0ubjp)}(hXWdemote is used to demote a number of huge pages. A user with root privileges can write to this file. It may not be possible to demote the requested number of huge pages. To determine how many pages were actually demoted, compare the value of nr_hugepages before and after writing to the demote interface. demote is a write only interface. h](jv)}(hdemoteh]hdemote}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1juhhhMhjbubj)}(hhh]h)}(hXOis used to demote a number of huge pages. A user with root privileges can write to this file. It may not be possible to demote the requested number of huge pages. To determine how many pages were actually demoted, compare the value of nr_hugepages before and after writing to the demote interface. demote is a write only interface.h]hXOis used to demote a number of huge pages. A user with root privileges can write to this file. It may not be possible to demote the requested number of huge pages. To determine how many pages were actually demoted, compare the value of nr_hugepages before and after writing to the demote interface. demote is a write only interface.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1johhhMhj0hhubeh}(h]h ]h"]h$]h&]uh1jjhhhhhhhNubh)}(hThe interfaces which are the same as in ``/proc`` (all except demote and demote_size) function as described above for the default huge page-sized case.h](h(The interfaces which are the same as in }(hjhhhNhNubj)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhf (all except demote and demote_size) function as described above for the default huge page-sized case.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hhhhubhtarget)}(h.. _mem_policy_and_hp_alloc:h]h}(h]h ]h"]h$]h&]refidmem-policy-and-hp-allocuh1jhM$hhhhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCInteraction of Task Memory Policy with Huge Page Allocation/Freeingh]hCInteraction of Task Memory Policy with Huge Page Allocation/Freeing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM'ubh)}(hXWhether huge pages are allocated and freed via the ``/proc`` interface or the ``/sysfs`` interface using the ``nr_hugepages_mempolicy`` attribute, the NUMA nodes from which huge pages are allocated or freed are controlled by the NUMA memory policy of the task that modifies the ``nr_hugepages_mempolicy`` sysctl or attribute. When the ``nr_hugepages`` attribute is used, mempolicy is ignored.h](h3Whether huge pages are allocated and freed via the }(hjhhhNhNubj)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh interface or the }(hjhhhNhNubj)}(h ``/sysfs``h]h/sysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh interface using the }(hjhhhNhNubj)}(h``nr_hugepages_mempolicy``h]hnr_hugepages_mempolicy}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh attribute, the NUMA nodes from which huge pages are allocated or freed are controlled by the NUMA memory policy of the task that modifies the }(hjhhhNhNubj)}(h``nr_hugepages_mempolicy``h]hnr_hugepages_mempolicy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh sysctl or attribute. When the }(hjhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) attribute is used, mempolicy is ignored.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM)hjhhubh)}(hThe recommended method to allocate or free huge pages to/from the kernel huge page pool, using the ``nr_hugepages`` example above, is::h](hcThe recommended method to allocate or free huge pages to/from the kernel huge page pool, using the }(hjFhhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh example above, is:}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM0hjhhubjK)}(hknumactl --interleave echo 20 \ >/proc/sys/vm/nr_hugepages_mempolicyh]hknumactl --interleave echo 20 \ >/proc/sys/vm/nr_hugepages_mempolicy}hjfsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhM3hjhhubh)}(hor, more succinctly::h]hor, more succinctly:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubjK)}(hCnumactl -m echo 20 >/proc/sys/vm/nr_hugepages_mempolicyh]hCnumactl -m echo 20 >/proc/sys/vm/nr_hugepages_mempolicy}hjsbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhM8hjhhubh)}(hX4This will allocate or free ``abs(20 - nr_hugepages)`` to or from the nodes specified in , depending on whether number of persistent huge pages is initially less than or greater than 20, respectively. No huge pages will be allocated nor freed on any node not included in the specified .h](hThis will allocate or free }(hjhhhNhNubj)}(h``abs(20 - nr_hugepages)``h]habs(20 - nr_hugepages)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to or from the nodes specified in , depending on whether number of persistent huge pages is initially less than or greater than 20, respectively. No huge pages will be allocated nor freed on any node not included in the specified .}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM:hjhhubh)}(hWhen adjusting the persistent hugepage count via ``nr_hugepages_mempolicy``, any memory policy mode--bind, preferred, local or interleave--may be used. The resulting effect on persistent huge page allocation is as follows:h](h1When adjusting the persistent hugepage count via }(hjhhhNhNubj)}(h``nr_hugepages_mempolicy``h]hnr_hugepages_mempolicy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, any memory policy mode--bind, preferred, local or interleave--may be used. The resulting effect on persistent huge page allocation is as follows:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM?hjhhubhenumerated_list)}(hhh](h list_item)}(hX\Regardless of mempolicy mode [see Documentation/admin-guide/mm/numa_memory_policy.rst], persistent huge pages will be distributed across the node or nodes specified in the mempolicy as if "interleave" had been specified. However, if a node in the policy does not contain sufficient contiguous memory for a huge page, the allocation will not "fallback" to the nearest neighbor node with sufficient contiguous memory. To do this would cause undesirable imbalance in the distribution of the huge page pool, or possibly, allocation of persistent huge pages on nodes not allowed by the task's memory policy. h]h)}(hX[Regardless of mempolicy mode [see Documentation/admin-guide/mm/numa_memory_policy.rst], persistent huge pages will be distributed across the node or nodes specified in the mempolicy as if "interleave" had been specified. However, if a node in the policy does not contain sufficient contiguous memory for a huge page, the allocation will not "fallback" to the nearest neighbor node with sufficient contiguous memory. To do this would cause undesirable imbalance in the distribution of the huge page pool, or possibly, allocation of persistent huge pages on nodes not allowed by the task's memory policy.h]hXeRegardless of mempolicy mode [see Documentation/admin-guide/mm/numa_memory_policy.rst], persistent huge pages will be distributed across the node or nodes specified in the mempolicy as if “interleave” had been specified. However, if a node in the policy does not contain sufficient contiguous memory for a huge page, the allocation will not “fallback” to the nearest neighbor node with sufficient contiguous memory. To do this would cause undesirable imbalance in the distribution of the huge page pool, or possibly, allocation of persistent huge pages on nodes not allowed by the task’s memory policy.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXOne or more nodes may be specified with the bind or interleave policy. If more than one node is specified with the preferred policy, only the lowest numeric id will be used. Local policy will select the node where the task is running at the time the nodes_allowed mask is constructed. For local policy to be deterministic, the task must be bound to a cpu or cpus in a single node. Otherwise, the task could be migrated to some other node at any time after launch and the resulting node will be indeterminate. Thus, local policy is not very useful for this purpose. Any of the other mempolicy modes may be used to specify a single node. h]h)}(hX~One or more nodes may be specified with the bind or interleave policy. If more than one node is specified with the preferred policy, only the lowest numeric id will be used. Local policy will select the node where the task is running at the time the nodes_allowed mask is constructed. For local policy to be deterministic, the task must be bound to a cpu or cpus in a single node. Otherwise, the task could be migrated to some other node at any time after launch and the resulting node will be indeterminate. Thus, local policy is not very useful for this purpose. Any of the other mempolicy modes may be used to specify a single node.h]hX~One or more nodes may be specified with the bind or interleave policy. If more than one node is specified with the preferred policy, only the lowest numeric id will be used. Local policy will select the node where the task is running at the time the nodes_allowed mask is constructed. For local policy to be deterministic, the task must be bound to a cpu or cpus in a single node. Otherwise, the task could be migrated to some other node at any time after launch and the resulting node will be indeterminate. Thus, local policy is not very useful for this purpose. Any of the other mempolicy modes may be used to specify a single node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXThe nodes allowed mask will be derived from any non-default task mempolicy, whether this policy was set explicitly by the task itself or one of its ancestors, such as numactl. This means that if the task is invoked from a shell with non-default policy, that policy will be used. One can specify a node list of "all" with numactl --interleave or --membind [-m] to achieve interleaving over all nodes in the system or cpuset. h]h)}(hXThe nodes allowed mask will be derived from any non-default task mempolicy, whether this policy was set explicitly by the task itself or one of its ancestors, such as numactl. This means that if the task is invoked from a shell with non-default policy, that policy will be used. One can specify a node list of "all" with numactl --interleave or --membind [-m] to achieve interleaving over all nodes in the system or cpuset.h]hXThe nodes allowed mask will be derived from any non-default task mempolicy, whether this policy was set explicitly by the task itself or one of its ancestors, such as numactl. This means that if the task is invoked from a shell with non-default policy, that policy will be used. One can specify a node list of “all” with numactl --interleave or --membind [-m] to achieve interleaving over all nodes in the system or cpuset.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXlAny task mempolicy specified--e.g., using numactl--will be constrained by the resource limits of any cpuset in which the task runs. Thus, there will be no way for a task with non-default policy running in a cpuset with a subset of the system nodes to allocate huge pages outside the cpuset without first moving to a cpuset that contains all of the desired nodes. h]h)}(hXkAny task mempolicy specified--e.g., using numactl--will be constrained by the resource limits of any cpuset in which the task runs. Thus, there will be no way for a task with non-default policy running in a cpuset with a subset of the system nodes to allocate huge pages outside the cpuset without first moving to a cpuset that contains all of the desired nodes.h]hXkAny task mempolicy specified--e.g., using numactl--will be constrained by the resource limits of any cpuset in which the task runs. Thus, there will be no way for a task with non-default policy running in a cpuset with a subset of the system nodes to allocate huge pages outside the cpuset without first moving to a cpuset that contains all of the desired nodes.}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h~Boot-time huge page allocation attempts to distribute the requested number of huge pages over all on-lines nodes with memory. h]h)}(h}Boot-time huge page allocation attempts to distribute the requested number of huge pages over all on-lines nodes with memory.h]h}Boot-time huge page allocation attempts to distribute the requested number of huge pages over all on-lines nodes with memory.}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj7 ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhMCubeh}(h](Cinteraction-of-task-memory-policy-with-huge-page-allocation-freeingjeh ]h"](Cinteraction of task memory policy with huge page allocation/freeingmem_policy_and_hp_alloceh$]h&]uh1hhhhhhhhM'expect_referenced_by_name}j` jsexpect_referenced_by_id}jjsubh)}(hhh](h)}(hPer Node Hugepages Attributesh]hPer Node Hugepages Attributes}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjg hhhhhMiubh)}(hA subset of the contents of the root huge page control directory in sysfs, described above, will be replicated under each the system device of each NUMA node with memory in::h]hA subset of the contents of the root huge page control directory in sysfs, described above, will be replicated under each the system device of each NUMA node with memory in:}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjg hhubjK)}(h./sys/devices/system/node/node[0-9]*/hugepages/h]h./sys/devices/system/node/node[0-9]*/hugepages/}hj sbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhMohjg hhubh)}(hqUnder this directory, the subdirectory for each supported huge page size contains the following attribute files::h]hpUnder this directory, the subdirectory for each supported huge page size contains the following attribute files:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjg hhubjK)}(h-nr_hugepages free_hugepages surplus_hugepagesh]h-nr_hugepages free_hugepages surplus_hugepages}hj sbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhMthjg hhubh)}(hThe free\_' and surplus\_' attribute files are read-only. They return the number of free and surplus [overcommitted] huge pages, respectively, on the parent node.h]hThe free_’ and surplus_’ attribute files are read-only. They return the number of free and surplus [overcommitted] huge pages, respectively, on the parent node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjg hhubh)}(hX6The ``nr_hugepages`` attribute returns the total number of huge pages on the specified node. When this attribute is written, the number of persistent huge pages on the parent node will be adjusted to the specified value, if sufficient resources exist, regardless of the task's mempolicy or cpuset constraints.h](hThe }(hj hhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX$ attribute returns the total number of huge pages on the specified node. When this attribute is written, the number of persistent huge pages on the parent node will be adjusted to the specified value, if sufficient resources exist, regardless of the task’s mempolicy or cpuset constraints.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM|hjg hhubh)}(hNote that the number of overcommit and reserve pages remain global quantities, as we don't know until fault time, when the faulting task's mempolicy is applied, from which node the huge page allocation will be attempted.h]hNote that the number of overcommit and reserve pages remain global quantities, as we don’t know until fault time, when the faulting task’s mempolicy is applied, from which node the huge page allocation will be attempted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjg hhubh)}(hXThe hugetlb may be migrated between the per-node hugepages pool in the following scenarios: memory offline, memory failure, longterm pinning, syscalls(mbind, migrate_pages and move_pages), alloc_contig_range() and alloc_contig_pages(). Now only memory offline, memory failure and syscalls allow fallbacking to allocate a new hugetlb on a different node if the current node is unable to allocate during hugetlb migration, that means these 3 cases can break the per-node hugepages pool.h]hXThe hugetlb may be migrated between the per-node hugepages pool in the following scenarios: memory offline, memory failure, longterm pinning, syscalls(mbind, migrate_pages and move_pages), alloc_contig_range() and alloc_contig_pages(). Now only memory offline, memory failure and syscalls allow fallbacking to allocate a new hugetlb on a different node if the current node is unable to allocate during hugetlb migration, that means these 3 cases can break the per-node hugepages pool.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjg hhubj)}(h.. _using_huge_pages:h]h}(h]h ]h"]h$]h&]jusing-huge-pagesuh1jhMhjg hhhhubeh}(h]per-node-hugepages-attributesah ]h"]per node hugepages attributesah$]h&]uh1hhhhhhhhMiubh)}(hhh](h)}(hUsing Huge Pagesh]hUsing Huge Pages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hIf the user applications are going to request huge pages using mmap system call, then it is required that system administrator mount a file system of type hugetlbfs::h]hIf the user applications are going to request huge pages using mmap system call, then it is required that system administrator mount a file system of type hugetlbfs:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjK)}(hmount -t hugetlbfs \ -o uid=,gid=,mode=,pagesize=,size=,\ min_size=,nr_inodes= none /mnt/hugeh]hmount -t hugetlbfs \ -o uid=,gid=,mode=,pagesize=,size=,\ min_size=,nr_inodes= none /mnt/huge}hj, sbah}(h]h ]h"]h$]h&]jZj[uh1jJhhhMhj hhubh)}(hThis command mounts a (pseudo) filesystem of type hugetlbfs on the directory ``/mnt/huge``. Any file created on ``/mnt/huge`` uses huge pages.h](hMThis command mounts a (pseudo) filesystem of type hugetlbfs on the directory }(hj: hhhNhNubj)}(h ``/mnt/huge``h]h /mnt/huge}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj: ubh. Any file created on }(hj: hhhNhNubj)}(h ``/mnt/huge``h]h /mnt/huge}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj: ubh uses huge pages.}(hj: hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe ``uid`` and ``gid`` options sets the owner and group of the root of the file system. By default the ``uid`` and ``gid`` of the current process are taken.h](hThe }(hjl hhhNhNubj)}(h``uid``h]huid}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl ubh and }(hjl hhhNhNubj)}(h``gid``h]hgid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl ubhR options sets the owner and group of the root of the file system. By default the }(hjl hhhNhNubj)}(h``uid``h]huid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl ubh and }hjl sbj)}(h``gid``h]hgid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl ubh" of the current process are taken.}(hjl hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hThe ``mode`` option sets the mode of root of file system to value & 01777. This value is given in octal. By default the value 0755 is picked.3@h](hThe }(hj hhhNhNubj)}(h``mode``h]hmode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh option sets the mode of root of file system to value & 01777. This value is given in octal. By default the value 0755 is picked.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXIf the platform supports multiple huge page sizes, the ``pagesize`` option can be used to specify the huge page size and associated pool. ``pagesize`` is specified in bytes. If ``pagesize`` is not specified the platform's default huge page size and associated pool will be used.h](h7If the platform supports multiple huge page sizes, the }(hj hhhNhNubj)}(h ``pagesize``h]hpagesize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhG option can be used to specify the huge page size and associated pool. }(hj hhhNhNubj)}(h ``pagesize``h]hpagesize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is specified in bytes. If }(hj hhhNhNubj)}(h ``pagesize``h]hpagesize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh[ is not specified the platform’s default huge page size and associated pool will be used.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXThe ``size`` option sets the maximum value of memory (huge pages) allowed for that filesystem (``/mnt/huge``). The ``size`` option can be specified in bytes, or as a percentage of the specified huge page pool (``nr_hugepages``). The size is rounded down to HPAGE_SIZE boundary.h](hThe }(hj& hhhNhNubj)}(h``size``h]hsize}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubhS option sets the maximum value of memory (huge pages) allowed for that filesystem (}(hj& hhhNhNubj)}(h ``/mnt/huge``h]h /mnt/huge}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh). The }(hj& hhhNhNubj)}(h``size``h]hsize}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubhW option can be specified in bytes, or as a percentage of the specified huge page pool (}(hj& hhhNhNubj)}(h``nr_hugepages``h]h nr_hugepages}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj& ubh3). The size is rounded down to HPAGE_SIZE boundary.}(hj& hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX/The ``min_size`` option sets the minimum value of memory (huge pages) allowed for the filesystem. ``min_size`` can be specified in the same way as ``size``, either bytes or a percentage of the huge page pool. At mount time, the number of huge pages specified by ``min_size`` are reserved for use by the filesystem. If there are not enough free huge pages available, the mount will fail. As huge pages are allocated to the filesystem and freed, the reserve count is adjusted so that the sum of allocated and reserved huge pages is always at least ``min_size``.h](hThe }(hj| hhhNhNubj)}(h ``min_size``h]hmin_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubhR option sets the minimum value of memory (huge pages) allowed for the filesystem. }(hj| hhhNhNubj)}(h ``min_size``h]hmin_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubh% can be specified in the same way as }(hj| hhhNhNubj)}(h``size``h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubhk, either bytes or a percentage of the huge page pool. At mount time, the number of huge pages specified by }(hj| hhhNhNubj)}(h ``min_size``h]hmin_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubhX are reserved for use by the filesystem. If there are not enough free huge pages available, the mount will fail. As huge pages are allocated to the filesystem and freed, the reserve count is adjusted so that the sum of allocated and reserved huge pages is always at least }(hj| hhhNhNubj)}(h ``min_size``h]hmin_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj| ubh.}(hj| hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hVThe option ``nr_inodes`` sets the maximum number of inodes that ``/mnt/huge`` can use.h](h The option }(hj hhhNhNubj)}(h ``nr_inodes``h]h nr_inodes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh( sets the maximum number of inodes that }(hj hhhNhNubj)}(h ``/mnt/huge``h]h /mnt/huge}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh can use.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hmIf the ``size``, ``min_size`` or ``nr_inodes`` option is not provided on command line then no limits are set.h](hIf the }(hj hhhNhNubj)}(h``size``h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``min_size``h]hmin_size}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(hj hhhNhNubj)}(h ``nr_inodes``h]h nr_inodes}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh? option is not provided on command line then no limits are set.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hFor ``pagesize``, ``size``, ``min_size`` and ``nr_inodes`` options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For example, size=2K has the same meaning as size=2048.h](hFor }(hjZ hhhNhNubj)}(h ``pagesize``h]hpagesize}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh, }(hjZ hhhNhNubj)}(h``size``h]hsize}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh, }hjZ sbj)}(h ``min_size``h]hmin_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh and }(hjZ hhhNhNubj)}(h ``nr_inodes``h]h nr_inodes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh| options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For example, size=2K has the same meaning as size=2048.}(hjZ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hoWhile read system calls are supported on files that reside on hugetlb file systems, write system calls are not.h]hoWhile read system calls are supported on files that reside on hugetlb file systems, write system calls are not.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h{Regular chown, chgrp, and chmod commands (with right permissions) could be used to change the file attributes on hugetlbfs.h]h{Regular chown, chgrp, and chmod commands (with right permissions) could be used to change the file attributes on hugetlbfs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hAlso, it is important to note that no such mount command is required if applications are going to use only shmat/shmget system calls or mmap with MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see :ref:`map_hugetlb ` below.h](hAlso, it is important to note that no such mount command is required if applications are going to use only shmat/shmget system calls or mmap with MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see }(hj hhhNhNubh)}(h :ref:`map_hugetlb `h]j>)}(hj h]h map_hugetlb}(hj hhhNhNubah}(h]h ](jIstdstd-refeh"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]refdocjV refdomainj reftyperef refexplicitrefwarnj\ map_hugetlbuh1hhhhMhj ubh below.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX|Users who wish to use hugetlb memory via shared memory segment should be members of a supplementary group and system admin needs to configure that gid into ``/proc/sys/vm/hugetlb_shm_group``. It is possible for same or different applications to use any combination of mmaps and shm* calls, though the mount of filesystem will be required for using mmap calls without MAP_HUGETLB.h](hUsers who wish to use hugetlb memory via shared memory segment should be members of a supplementary group and system admin needs to configure that gid into }(hj hhhNhNubj)}(h"``/proc/sys/vm/hugetlb_shm_group``h]h/proc/sys/vm/hugetlb_shm_group}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. It is possible for same or different applications to use any combination of mmaps and shm* calls, though the mount of filesystem will be required for using mmap calls without MAP_HUGETLB.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX|Syscalls that operate on memory backed by hugetlb pages only have their lengths aligned to the native page size of the processor; they will normally fail with errno set to EINVAL or exclude hugetlb pages that extend beyond the length if not hugepage aligned. For example, munmap(2) will fail if memory is backed by a hugetlb page and the length is smaller than the hugepage size.h]hX|Syscalls that operate on memory backed by hugetlb pages only have their lengths aligned to the native page size of the processor; they will normally fail with errno set to EINVAL or exclude hugetlb pages that extend beyond the length if not hugepage aligned. For example, munmap(2) will fail if memory is backed by a hugetlb page and the length is smaller than the hugepage size.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h](j id1eh ]h"](using huge pagesusing_huge_pageseh$]h&]uh1hhhhhhhhMjc }j2 j sje }j j subh)}(hhh](h)}(hExamplesh]hExamples}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7 hhhhhMubj)}(h.. _map_hugetlb:h]h}(h]h ]h"]h$]h&]j map-hugetlbuh1jhMhj7 hhhhubjk)}(hhh](jp)}(h=``map_hugetlb`` see tools/testing/selftests/mm/map_hugetlb.c h](jv)}(h``map_hugetlb``h]j)}(hj\ h]h map_hugetlb}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubah}(h]h ]h"]h$]h&]uh1juhhhMhjV ubj)}(hhh]h)}(h,see tools/testing/selftests/mm/map_hugetlb.ch]h,see tools/testing/selftests/mm/map_hugetlb.c}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq ubah}(h]h ]h"]h$]h&]uh1jhjV ubeh}(h]h ]h"]h$]h&]uh1johhhMhjS ubjp)}(h?``hugepage-shm`` see tools/testing/selftests/mm/hugepage-shm.c h](jv)}(h``hugepage-shm``h]j)}(hj h]h hugepage-shm}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1juhhhMhj ubj)}(hhh]h)}(h-see tools/testing/selftests/mm/hugepage-shm.ch]h-see tools/testing/selftests/mm/hugepage-shm.c}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1johhhMhjS hhubjp)}(hA``hugepage-mmap`` see tools/testing/selftests/mm/hugepage-mmap.c h](jv)}(h``hugepage-mmap``h]j)}(hj h]h hugepage-mmap}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1juhhhMhj ubj)}(hhh]h)}(h.see tools/testing/selftests/mm/hugepage-mmap.ch]h.see tools/testing/selftests/mm/hugepage-mmap.c}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1johhhMhjS hhubeh}(h]jR ah ]h"] map_hugetlbah$]h&]uh1jjhj7 hhhhhNjc }jjH sje }jR jH subh)}(hThe `libhugetlbfs`_ library provides a wide range of userspace tools to help with huge page usability, environment setup, and control.h](hThe }(hjhhhNhNubh reference)}(h`libhugetlbfs`_h]h libhugetlbfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]name libhugetlbfsrefuri,https://github.com/libhugetlbfs/libhugetlbfsuh1jhjresolvedKubht library provides a wide range of userspace tools to help with huge page usability, environment setup, and control.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj7 hhubj)}(h>.. _libhugetlbfs: https://github.com/libhugetlbfs/libhugetlbfsh]h}(h] libhugetlbfsah ]h"] libhugetlbfsah$]h&]j!j"uh1jhMhj7 hhhhʌ referencedKubeh}(h]examplesah ]h"]examplesah$]h&]uh1hhhhhhhhMubeh}(h] hugetlb-pagesah ]h"] hugetlb pagesah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjnerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames} libhugetlbfs]jasrefids}(j]jaj ]j ajR ]jH aunameids}(jHjEjjj` jj_ j\ j j j2 j j1 j. j@j=jjR j7j4u nametypes}(jHjj` j_ j j2 j1 j@jj7uh}(jEhjhjjj\ jj jg j j j. j j=j7 jR jS j4j.u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j|KsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h=Hyperlink target "mem-policy-and-hp-alloc" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehʌlineM$uh1jubj)}(hhh]h)}(hhh]h6Hyperlink target "using-huge-pages" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehʌlineMuh1jubj)}(hhh]h)}(hhh]h1Hyperlink target "map-hugetlb" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehʌlineMuh1jube transformerN include_log] decorationNhhub.