sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/mm/physical_memorymodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/pt_BR/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/mm/physical_memorymodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/mm/physical_memory.rsthKubhsection)}(hhh](htitle)}(hPhysical Memoryh]hPhysical Memory}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hLinux is available for a wide range of architectures so there is a need for an architecture-independent abstraction to represent the physical memory. This chapter describes the structures used to manage physical memory in a running system.h]hLinux is available for a wide range of architectures so there is a need for an architecture-independent abstraction to represent the physical memory. This chapter describes the structures used to manage physical memory in a running system.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe first principal concept prevalent in the memory management is `Non-Uniform Memory Access (NUMA) `_. With multi-core and multi-socket machines, memory may be arranged into banks that incur a different cost to access depending on the “distance” from the processor. For example, there might be a bank of memory assigned to each CPU or a bank of memory very suitable for DMA near peripheral devices.h](hBThe first principal concept prevalent in the memory management is }(hhhhhNhNubh reference)}(h]`Non-Uniform Memory Access (NUMA) `_h]h Non-Uniform Memory Access (NUMA)}(hhhhhNhNubah}(h]h ]h"]h$]h&]name Non-Uniform Memory Access (NUMA)refuri7https://en.wikipedia.org/wiki/Non-uniform_memory_accessuh1hhhubhtarget)}(h: h]h}(h]non-uniform-memory-access-numaah ]h"] non-uniform memory access (numa)ah$]h&]refurijuh1j  referencedKhhubhX-. With multi-core and multi-socket machines, memory may be arranged into banks that incur a different cost to access depending on the “distance” from the processor. For example, there might be a bank of memory assigned to each CPU or a bank of memory very suitable for DMA near peripheral devices.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXHEach bank is called a node and the concept is represented under Linux by a ``struct pglist_data`` even if the architecture is UMA. This structure is always referenced by its typedef ``pg_data_t``. A ``pg_data_t`` structure for a particular node can be referenced by ``NODE_DATA(nid)`` macro where ``nid`` is the ID of that node.h](hKEach bank is called a node and the concept is represented under Linux by a }(hj#hhhNhNubhliteral)}(h``struct pglist_data``h]hstruct pglist_data}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj#ubhU even if the architecture is UMA. This structure is always referenced by its typedef }(hj#hhhNhNubj,)}(h ``pg_data_t``h]h pg_data_t}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj#ubh. A }(hj#hhhNhNubj,)}(h ``pg_data_t``h]h pg_data_t}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj#ubh6 structure for a particular node can be referenced by }(hj#hhhNhNubj,)}(h``NODE_DATA(nid)``h]hNODE_DATA(nid)}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj#ubh macro where }(hj#hhhNhNubj,)}(h``nid``h]hnid}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj#ubh is the ID of that node.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXeFor NUMA architectures, the node structures are allocated by the architecture specific code early during boot. Usually, these structures are allocated locally on the memory bank they represent. For UMA architectures, only one static ``pg_data_t`` structure called ``contig_page_data`` is used. Nodes will be discussed further in Section :ref:`Nodes `h](hFor NUMA architectures, the node structures are allocated by the architecture specific code early during boot. Usually, these structures are allocated locally on the memory bank they represent. For UMA architectures, only one static }(hjhhhNhNubj,)}(h ``pg_data_t``h]h pg_data_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh structure called }(hjhhhNhNubj,)}(h``contig_page_data``h]hcontig_page_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh5 is used. Nodes will be discussed further in Section }(hjhhhNhNubh)}(h:ref:`Nodes `h]hinline)}(hjh]hNodes}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocmm/physical_memory refdomainjreftyperef refexplicitrefwarn reftargetnodesuh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXwThe entire physical address space is partitioned into one or more blocks called zones which represent ranges within memory. These ranges are usually determined by architectural constraints for accessing the physical memory. The memory range within a node that corresponds to a particular zone is described by a ``struct zone``. Each zone has one of the types described below.h](hX7The entire physical address space is partitioned into one or more blocks called zones which represent ranges within memory. These ranges are usually determined by architectural constraints for accessing the physical memory. The memory range within a node that corresponds to a particular zone is described by a }(hjhhhNhNubj,)}(h``struct zone``h]h struct zone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh1. Each zone has one of the types described below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(hX``ZONE_DMA`` and ``ZONE_DMA32`` historically represented memory suitable for DMA by peripheral devices that cannot access all of the addressable memory. For many years there are better more and robust interfaces to get memory with DMA specific requirements (Documentation/core-api/dma-api.rst), but ``ZONE_DMA`` and ``ZONE_DMA32`` still represent memory ranges that have restrictions on how they can be accessed. Depending on the architecture, either of these zone types or even they both can be disabled at build time using ``CONFIG_ZONE_DMA`` and ``CONFIG_ZONE_DMA32`` configuration options. Some 64-bit platforms may need both zones as they support peripherals with different DMA addressing limitations. h]h)}(hX``ZONE_DMA`` and ``ZONE_DMA32`` historically represented memory suitable for DMA by peripheral devices that cannot access all of the addressable memory. For many years there are better more and robust interfaces to get memory with DMA specific requirements (Documentation/core-api/dma-api.rst), but ``ZONE_DMA`` and ``ZONE_DMA32`` still represent memory ranges that have restrictions on how they can be accessed. Depending on the architecture, either of these zone types or even they both can be disabled at build time using ``CONFIG_ZONE_DMA`` and ``CONFIG_ZONE_DMA32`` configuration options. Some 64-bit platforms may need both zones as they support peripherals with different DMA addressing limitations.h](j,)}(h ``ZONE_DMA``h]hZONE_DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }(hjhhhNhNubj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhX  historically represented memory suitable for DMA by peripheral devices that cannot access all of the addressable memory. For many years there are better more and robust interfaces to get memory with DMA specific requirements (Documentation/core-api/dma-api.rst), but }(hjhhhNhNubj,)}(h ``ZONE_DMA``h]hZONE_DMA}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }hjsbj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh still represent memory ranges that have restrictions on how they can be accessed. Depending on the architecture, either of these zone types or even they both can be disabled at build time using }(hjhhhNhNubj,)}(h``CONFIG_ZONE_DMA``h]hCONFIG_ZONE_DMA}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }(hjhhhNhNubj,)}(h``CONFIG_ZONE_DMA32``h]hCONFIG_ZONE_DMA32}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh configuration options. Some 64-bit platforms may need both zones as they support peripherals with different DMA addressing limitations.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hj ubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(h``ZONE_NORMAL`` is for normal memory that can be accessed by the kernel all the time. DMA operations can be performed on pages in this zone if the DMA devices support transfers to all addressable memory. ``ZONE_NORMAL`` is always enabled. h]h)}(h``ZONE_NORMAL`` is for normal memory that can be accessed by the kernel all the time. DMA operations can be performed on pages in this zone if the DMA devices support transfers to all addressable memory. ``ZONE_NORMAL`` is always enabled.h](j,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is for normal memory that can be accessed by the kernel all the time. DMA operations can be performed on pages in this zone if the DMA devices support transfers to all addressable memory. }(hjhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is always enabled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hX.``ZONE_HIGHMEM`` is the part of the physical memory that is not covered by a permanent mapping in the kernel page tables. The memory in this zone is only accessible to the kernel using temporary mappings. This zone is available only on some 32-bit architectures and is enabled with ``CONFIG_HIGHMEM``. h]h)}(hX-``ZONE_HIGHMEM`` is the part of the physical memory that is not covered by a permanent mapping in the kernel page tables. The memory in this zone is only accessible to the kernel using temporary mappings. This zone is available only on some 32-bit architectures and is enabled with ``CONFIG_HIGHMEM``.h](j,)}(h``ZONE_HIGHMEM``h]h ZONE_HIGHMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhX  is the part of the physical memory that is not covered by a permanent mapping in the kernel page tables. The memory in this zone is only accessible to the kernel using temporary mappings. This zone is available only on some 32-bit architectures and is enabled with }(hjhhhNhNubj,)}(h``CONFIG_HIGHMEM``h]hCONFIG_HIGHMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hXT``ZONE_MOVABLE`` is for normal accessible memory, just like ``ZONE_NORMAL``. The difference is that the contents of most pages in ``ZONE_MOVABLE`` is movable. That means that while virtual addresses of these pages do not change, their content may move between different physical pages. Often ``ZONE_MOVABLE`` is populated during memory hotplug, but it may be also populated on boot using one of ``kernelcore``, ``movablecore`` and ``movable_node`` kernel command line parameters. See Documentation/mm/page_migration.rst and Documentation/admin-guide/mm/memory-hotplug.rst for additional details. h]h)}(hXS``ZONE_MOVABLE`` is for normal accessible memory, just like ``ZONE_NORMAL``. The difference is that the contents of most pages in ``ZONE_MOVABLE`` is movable. That means that while virtual addresses of these pages do not change, their content may move between different physical pages. Often ``ZONE_MOVABLE`` is populated during memory hotplug, but it may be also populated on boot using one of ``kernelcore``, ``movablecore`` and ``movable_node`` kernel command line parameters. See Documentation/mm/page_migration.rst and Documentation/admin-guide/mm/memory-hotplug.rst for additional details.h](j,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh, is for normal accessible memory, just like }(hjhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh7. The difference is that the contents of most pages in }(hjhhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is movable. That means that while virtual addresses of these pages do not change, their content may move between different physical pages. Often }(hjhhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhW is populated during memory hotplug, but it may be also populated on boot using one of }(hjhhhNhNubj,)}(h``kernelcore``h]h kernelcore}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh, }(hjhhhNhNubj,)}(h``movablecore``h]h movablecore}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }(hjhhhNhNubj,)}(h``movable_node``h]h movable_node}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh kernel command line parameters. See Documentation/mm/page_migration.rst and Documentation/admin-guide/mm/memory-hotplug.rst for additional details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj )}(hXP``ZONE_DEVICE`` represents memory residing on devices such as PMEM and GPU. It has different characteristics than RAM zone types and it exists to provide :ref:`struct page ` and memory map services for device driver identified physical address ranges. ``ZONE_DEVICE`` is enabled with configuration option ``CONFIG_ZONE_DEVICE``. h]h)}(hXO``ZONE_DEVICE`` represents memory residing on devices such as PMEM and GPU. It has different characteristics than RAM zone types and it exists to provide :ref:`struct page ` and memory map services for device driver identified physical address ranges. ``ZONE_DEVICE`` is enabled with configuration option ``CONFIG_ZONE_DEVICE``.h](j,)}(h``ZONE_DEVICE``h]h ZONE_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh represents memory residing on devices such as PMEM and GPU. It has different characteristics than RAM zone types and it exists to provide }(hjhhhNhNubh)}(h:ref:`struct page `h]j)}(hjh]h struct page}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjpagesuh1hhhhKGhjubhO and memory map services for device driver identified physical address ranges. }(hjhhhNhNubj,)}(h``ZONE_DEVICE``h]h ZONE_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh& is enabled with configuration option }(hjhhhNhNubj,)}(h``CONFIG_ZONE_DEVICE``h]hCONFIG_ZONE_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhK'hhhhubh)}(hIt is important to note that many kernel operations can only take place using ``ZONE_NORMAL`` so it is the most performance critical zone. Zones are discussed further in Section :ref:`Zones `.h](hNIt is important to note that many kernel operations can only take place using }(hjhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhU so it is the most performance critical zone. Zones are discussed further in Section }(hjhhhNhNubh)}(h:ref:`Zones `h]j)}(hjh]hZones}(hj!hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj+reftyperef refexplicitrefwarnjzonesuh1hhhhKMhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhhhhubh)}(hThe relation between node and zone extents is determined by the physical memory map reported by the firmware, architectural constraints for memory addressing and certain parameters in the kernel command line.h]hThe relation between node and zone extents is determined by the physical memory map reported by the firmware, architectural constraints for memory addressing and certain parameters in the kernel command line.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhhhhubh)}(hFor example, with 32-bit kernel on an x86 UMA machine with 2 Gbytes of RAM the entire memory will be on node 0 and there will be three zones: ``ZONE_DMA``, ``ZONE_NORMAL`` and ``ZONE_HIGHMEM``::h](hFor example, with 32-bit kernel on an x86 UMA machine with 2 Gbytes of RAM the entire memory will be on node 0 and there will be three zones: }(hjUhhhNhNubj,)}(h ``ZONE_DMA``h]hZONE_DMA}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjUubh, }(hjUhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjUubh and }(hjUhhhNhNubj,)}(h``ZONE_HIGHMEM``h]h ZONE_HIGHMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjUubh:}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKUhhhhubh literal_block)}(hX0 2G +-------------------------------------------------------------+ | node 0 | +-------------------------------------------------------------+ 0 16M 896M 2G +----------+-----------------------+--------------------------+ | ZONE_DMA | ZONE_NORMAL | ZONE_HIGHMEM | +----------+-----------------------+--------------------------+h]hX0 2G +-------------------------------------------------------------+ | node 0 | +-------------------------------------------------------------+ 0 16M 896M 2G +----------+-----------------------+--------------------------+ | ZONE_DMA | ZONE_NORMAL | ZONE_HIGHMEM | +----------+-----------------------+--------------------------+}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKYhhhhubh)}(hXEWith a kernel built with ``ZONE_DMA`` disabled and ``ZONE_DMA32`` enabled and booted with ``movablecore=80%`` parameter on an arm64 machine with 16 Gbytes of RAM equally split between two nodes, there will be ``ZONE_DMA32``, ``ZONE_NORMAL`` and ``ZONE_MOVABLE`` on node 0, and ``ZONE_NORMAL`` and ``ZONE_MOVABLE`` on node 1::h](hWith a kernel built with }(hjhhhNhNubj,)}(h ``ZONE_DMA``h]hZONE_DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh disabled and }(hjhhhNhNubj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh enabled and booted with }(hjhhhNhNubj,)}(h``movablecore=80%``h]hmovablecore=80%}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhd parameter on an arm64 machine with 16 Gbytes of RAM equally split between two nodes, there will be }(hjhhhNhNubj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh, }(hjhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }(hjhhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh on node 0, and }(hjhhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh and }(hjhhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh on node 1:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKdhhhhubj)}(hX1G 9G 17G +--------------------------------+ +--------------------------+ | node 0 | | node 1 | +--------------------------------+ +--------------------------+ 1G 4G 4200M 9G 9320M 17G +---------+----------+-----------+ +------------+-------------+ | DMA32 | NORMAL | MOVABLE | | NORMAL | MOVABLE | +---------+----------+-----------+ +------------+-------------+h]hX1G 9G 17G +--------------------------------+ +--------------------------+ | node 0 | | node 1 | +--------------------------------+ +--------------------------+ 1G 4G 4200M 9G 9320M 17G +---------+----------+-----------+ +------------+-------------+ | DMA32 | NORMAL | MOVABLE | | NORMAL | MOVABLE | +---------+----------+-----------+ +------------+-------------+}hjGsbah}(h]h ]h"]h$]h&]hhuh1jhhhKkhhhhubh)}(hMemory banks may belong to interleaving nodes. In the example below an x86 machine has 16 Gbytes of RAM in 4 memory banks, even banks belong to node 0 and odd banks belong to node 1::h]hMemory banks may belong to interleaving nodes. In the example below an x86 machine has 16 Gbytes of RAM in 4 memory banks, even banks belong to node 0 and odd banks belong to node 1:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhhhhubj)}(hX0 4G 8G 12G 16G +-------------+ +-------------+ +-------------+ +-------------+ | node 0 | | node 1 | | node 0 | | node 1 | +-------------+ +-------------+ +-------------+ +-------------+ 0 16M 4G +-----+-------+ +-------------+ +-------------+ +-------------+ | DMA | DMA32 | | NORMAL | | NORMAL | | NORMAL | +-----+-------+ +-------------+ +-------------+ +-------------+h]hX0 4G 8G 12G 16G +-------------+ +-------------+ +-------------+ +-------------+ | node 0 | | node 1 | | node 0 | | node 1 | +-------------+ +-------------+ +-------------+ +-------------+ 0 16M 4G +-----+-------+ +-------------+ +-------------+ +-------------+ | DMA | DMA32 | | NORMAL | | NORMAL | | NORMAL | +-----+-------+ +-------------+ +-------------+ +-------------+}hjcsbah}(h]h ]h"]h$]h&]hhuh1jhhhK{hhhhubh)}(h[In this case node 0 will span from 0 to 12 Gbytes and node 1 will span from 4 to 16 Gbytes.h]h[In this case node 0 will span from 0 to 12 Gbytes and node 1 will span from 4 to 16 Gbytes.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj )}(h .. _nodes:h]h}(h]h ]h"]h$]h&]refidnodesuh1j hKhhhhhhubh)}(hhh](h)}(hNodesh]hNodes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXAs we have mentioned, each node in memory is described by a ``pg_data_t`` which is a typedef for a ``struct pglist_data``. When allocating a page, by default Linux uses a node-local allocation policy to allocate memory from the node closest to the running CPU. As processes tend to run on the same CPU, it is likely the memory from the current node will be used. The allocation policy can be controlled by users as described in Documentation/admin-guide/mm/numa_memory_policy.rst.h](h`.h](hXeMost NUMA architectures maintain an array of pointers to the node structures. The actual structures are allocated early during boot when architecture specific code parses the physical memory map reported by the firmware. The bulk of the node initialization happens slightly later in the boot process by free_area_init() function, described later in Section }(hjhhhNhNubh)}(h&:ref:`Initialization `h]j)}(hjh]hInitialization}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjinitializationuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hAlong with the node structures, kernel maintains an array of ``nodemask_t`` bitmasks called ``node_states``. Each bitmask in this array represents a set of nodes with particular properties as defined by ``enum node_states``:h](h=Along with the node structures, kernel maintains an array of }(hjhhhNhNubj,)}(h``nodemask_t``h]h nodemask_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh bitmasks called }(hjhhhNhNubj,)}(h``node_states``h]h node_states}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh`. Each bitmask in this array represents a set of nodes with particular properties as defined by }(hjhhhNhNubj,)}(h``enum node_states``h]henum node_states}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(h:``N_POSSIBLE`` The node could become online at some point.h](hterm)}(h``N_POSSIBLE``h]j,)}(hjSh]h N_POSSIBLE}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjQubah}(h]h ]h"]h$]h&]uh1jOhhhKhjKubh definition)}(hhh]h)}(h+The node could become online at some point.h]h+The node could become online at some point.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjjubah}(h]h ]h"]h$]h&]uh1jhhjKubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFubjJ)}(h ``N_ONLINE`` The node is online.h](jP)}(h ``N_ONLINE``h]j,)}(hjh]hN_ONLINE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjubji)}(hhh]h)}(hThe node is online.h]hThe node is online.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubjJ)}(h0``N_NORMAL_MEMORY`` The node has regular memory.h](jP)}(h``N_NORMAL_MEMORY``h]j,)}(hjh]hN_NORMAL_MEMORY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjubji)}(hhh]h)}(hThe node has regular memory.h]hThe node has regular memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubjJ)}(hz``N_HIGH_MEMORY`` The node has regular or high memory. When ``CONFIG_HIGHMEM`` is disabled aliased to ``N_NORMAL_MEMORY``.h](jP)}(h``N_HIGH_MEMORY``h]j,)}(hjh]h N_HIGH_MEMORY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjubji)}(hhh]h)}(hhThe node has regular or high memory. When ``CONFIG_HIGHMEM`` is disabled aliased to ``N_NORMAL_MEMORY``.h](h*The node has regular or high memory. When }(hjhhhNhNubj,)}(h``CONFIG_HIGHMEM``h]hCONFIG_HIGHMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is disabled aliased to }(hjhhhNhNubj,)}(h``N_NORMAL_MEMORY``h]hN_NORMAL_MEMORY}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubjJ)}(h8``N_MEMORY`` The node has memory(regular, high, movable)h](jP)}(h ``N_MEMORY``h]j,)}(hjYh]hN_MEMORY}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjWubah}(h]h ]h"]h$]h&]uh1jOhhhKhjSubji)}(hhh]h)}(h+The node has memory(regular, high, movable)h]h+The node has memory(regular, high, movable)}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubah}(h]h ]h"]h$]h&]uh1jhhjSubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubjJ)}(h'``N_CPU`` The node has one or more CPUsh](jP)}(h ``N_CPU``h]j,)}(hjh]hN_CPU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjubji)}(hhh]h)}(hThe node has one or more CPUsh]hThe node has one or more CPUs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubjJ)}(hD``N_GENERIC_INITIATOR`` The node has one or more Generic Initiators h](jP)}(h``N_GENERIC_INITIATOR``h]j,)}(hjh]hN_GENERIC_INITIATOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjubji)}(hhh]h)}(h+The node has one or more Generic Initiatorsh]h+The node has one or more Generic Initiators}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjFhhubeh}(h]h ]h"]h$]h&]uh1jDhjhhhhhNubh)}(hFor each node that has a property described above, the bit corresponding to the node ID in the ``node_states[]`` bitmask is set.h](h_For each node that has a property described above, the bit corresponding to the node ID in the }(hjhhhNhNubj,)}(h``node_states[]``h]hnode_states[]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh bitmask is set.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hLFor example, for node 2 with normal memory and CPUs, bit 2 will be set in ::h]hIFor example, for node 2 with normal memory and CPUs, bit 2 will be set in}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hnode_states[N_POSSIBLE] node_states[N_ONLINE] node_states[N_NORMAL_MEMORY] node_states[N_HIGH_MEMORY] node_states[N_MEMORY] node_states[N_CPU]h]hnode_states[N_POSSIBLE] node_states[N_ONLINE] node_states[N_NORMAL_MEMORY] node_states[N_HIGH_MEMORY] node_states[N_MEMORY] node_states[N_CPU]}hj/sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(h\For various operations possible with nodemasks please refer to ``include/linux/nodemask.h``.h](h?For various operations possible with nodemasks please refer to }(hj=hhhNhNubj,)}(h``include/linux/nodemask.h``h]hinclude/linux/nodemask.h}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj=ubh.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hAmong other things, nodemasks are used to provide macros for node traversal, namely ``for_each_node()`` and ``for_each_online_node()``.h](hTAmong other things, nodemasks are used to provide macros for node traversal, namely }(hj]hhhNhNubj,)}(h``for_each_node()``h]hfor_each_node()}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubh and }(hj]hhhNhNubj,)}(h``for_each_online_node()``h]hfor_each_online_node()}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubh.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h=For instance, to call a function foo() for each online node::h]h ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj: ubji)}(hhh]h)}(hThe list of all zones in all nodes. This list defines the order of zones that allocations are preferred from. The ``node_zonelists`` is set up by ``build_zonelists()`` in ``mm/page_alloc.c`` during the initialization of core memory management structures.h](hrThe list of all zones in all nodes. This list defines the order of zones that allocations are preferred from. The }(hjX hhhNhNubj,)}(h``node_zonelists``h]hnode_zonelists}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjX ubh is set up by }(hjX hhhNhNubj,)}(h``build_zonelists()``h]hbuild_zonelists()}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjX ubh in }(hjX hhhNhNubj,)}(h``mm/page_alloc.c``h]hmm/page_alloc.c}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjX ubh@ during the initialization of core memory management structures.}(hjX hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjU ubah}(h]h ]h"]h$]h&]uh1jhhj: ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(h5``nr_zones`` Number of populated zones in this node. h](jP)}(h ``nr_zones``h]j,)}(hj h]hnr_zones}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(h'Number of populated zones in this node.h]h'Number of populated zones in this node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(h``node_mem_map`` For UMA systems that use FLATMEM memory model the 0's node ``node_mem_map`` is array of struct pages representing each physical frame. h](jP)}(h``node_mem_map``h]j,)}(hj h]h node_mem_map}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(hFor UMA systems that use FLATMEM memory model the 0's node ``node_mem_map`` is array of struct pages representing each physical frame.h](h=For UMA systems that use FLATMEM memory model the 0’s node }(hj hhhNhNubj,)}(h``node_mem_map``h]h node_mem_map}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubh; is array of struct pages representing each physical frame.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(h``node_page_ext`` For UMA systems that use FLATMEM memory model the 0's node ``node_page_ext`` is array of extensions of struct pages. Available only in the kernels built with ``CONFIG_PAGE_EXTENSION`` enabled. h](jP)}(h``node_page_ext``h]j,)}(hj0 h]h node_page_ext}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj. ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj* ubji)}(hhh]h)}(hFor UMA systems that use FLATMEM memory model the 0's node ``node_page_ext`` is array of extensions of struct pages. Available only in the kernels built with ``CONFIG_PAGE_EXTENSION`` enabled.h](h=For UMA systems that use FLATMEM memory model the 0’s node }(hjH hhhNhNubj,)}(h``node_page_ext``h]h node_page_ext}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjH ubhR is array of extensions of struct pages. Available only in the kernels built with }(hjH hhhNhNubj,)}(h``CONFIG_PAGE_EXTENSION``h]hCONFIG_PAGE_EXTENSION}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjH ubh enabled.}(hjH hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjE ubah}(h]h ]h"]h$]h&]uh1jhhj* ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(hR``node_start_pfn`` The page frame number of the starting page frame in this node. h](jP)}(h``node_start_pfn``h]j,)}(hj h]hnode_start_pfn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(h>The page frame number of the starting page frame in this node.h]h>The page frame number of the starting page frame in this node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(hL``node_present_pages`` Total number of physical pages present in this node. h](jP)}(h``node_present_pages``h]j,)}(hj h]hnode_present_pages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(h4Total number of physical pages present in this node.h]h4Total number of physical pages present in this node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(hK``node_spanned_pages`` Total size of physical page range, including holes. h](jP)}(h``node_spanned_pages``h]j,)}(hj h]hnode_spanned_pages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(h3Total size of physical page range, including holes.h]h3Total size of physical page range, including holes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(hX``node_size_lock`` A lock that protects the fields defining the node extents. Only defined when at least one of ``CONFIG_MEMORY_HOTPLUG`` or ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` configuration options are enabled. ``pgdat_resize_lock()`` and ``pgdat_resize_unlock()`` are provided to manipulate ``node_size_lock`` without checking for ``CONFIG_MEMORY_HOTPLUG`` or ``CONFIG_DEFERRED_STRUCT_PAGE_INIT``. h](jP)}(h``node_size_lock``h]j,)}(hj4 h]hnode_size_lock}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj2 ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj. ubji)}(hhh]h)}(hX}A lock that protects the fields defining the node extents. Only defined when at least one of ``CONFIG_MEMORY_HOTPLUG`` or ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` configuration options are enabled. ``pgdat_resize_lock()`` and ``pgdat_resize_unlock()`` are provided to manipulate ``node_size_lock`` without checking for ``CONFIG_MEMORY_HOTPLUG`` or ``CONFIG_DEFERRED_STRUCT_PAGE_INIT``.h](h]A lock that protects the fields defining the node extents. Only defined when at least one of }(hjL hhhNhNubj,)}(h``CONFIG_MEMORY_HOTPLUG``h]hCONFIG_MEMORY_HOTPLUG}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh or }(hjL hhhNhNubj,)}(h$``CONFIG_DEFERRED_STRUCT_PAGE_INIT``h]h CONFIG_DEFERRED_STRUCT_PAGE_INIT}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh$ configuration options are enabled. }(hjL hhhNhNubj,)}(h``pgdat_resize_lock()``h]hpgdat_resize_lock()}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh and }(hjL hhhNhNubj,)}(h``pgdat_resize_unlock()``h]hpgdat_resize_unlock()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh are provided to manipulate }(hjL hhhNhNubj,)}(h``node_size_lock``h]hnode_size_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh without checking for }(hjL hhhNhNubj,)}(h``CONFIG_MEMORY_HOTPLUG``h]hCONFIG_MEMORY_HOTPLUG}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh or }(hjL hhhNhNubj,)}(h$``CONFIG_DEFERRED_STRUCT_PAGE_INIT``h]h CONFIG_DEFERRED_STRUCT_PAGE_INIT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjL ubh.}(hjL hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjI ubah}(h]h ]h"]h$]h&]uh1jhhj. ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(h8``node_id`` The Node ID (NID) of the node, starts at 0. h](jP)}(h ``node_id``h]j,)}(hj h]hnode_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhKhj ubji)}(hhh]h)}(h+The Node ID (NID) of the node, starts at 0.h]h+The Node ID (NID) of the node, starts at 0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhKhjhhubjJ)}(hl``totalreserve_pages`` This is a per-node reserve of pages that are not available to userspace allocations. h](jP)}(h``totalreserve_pages``h]j,)}(hj" h]htotalreserve_pages}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhMhj ubji)}(hhh]h)}(hTThis is a per-node reserve of pages that are not available to userspace allocations.h]hTThis is a per-node reserve of pages that are not available to userspace allocations.}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7 ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``first_deferred_pfn`` If memory initialization on large machines is deferred then this is the first PFN that needs to be initialized. Defined only when ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` is enabled h](jP)}(h``first_deferred_pfn``h]j,)}(hjZ h]hfirst_deferred_pfn}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjX ubah}(h]h ]h"]h$]h&]uh1jOhhhMhjT ubji)}(hhh]h)}(hIf memory initialization on large machines is deferred then this is the first PFN that needs to be initialized. Defined only when ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` is enabledh](hIf memory initialization on large machines is deferred then this is the first PFN that needs to be initialized. Defined only when }(hjr hhhNhNubj,)}(h$``CONFIG_DEFERRED_STRUCT_PAGE_INIT``h]h CONFIG_DEFERRED_STRUCT_PAGE_INIT}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjr ubh is enabled}(hjr hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo ubah}(h]h ]h"]h$]h&]uh1jhhjT ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``deferred_split_queue`` Per-node queue of huge pages that their split was deferred. Defined only when ``CONFIG_TRANSPARENT_HUGEPAGE`` is enabled. h](jP)}(h``deferred_split_queue``h]j,)}(hj h]hdeferred_split_queue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhM hj ubji)}(hhh]h)}(hyPer-node queue of huge pages that their split was deferred. Defined only when ``CONFIG_TRANSPARENT_HUGEPAGE`` is enabled.h](hNPer-node queue of huge pages that their split was deferred. Defined only when }(hj hhhNhNubj,)}(h``CONFIG_TRANSPARENT_HUGEPAGE``h]hCONFIG_TRANSPARENT_HUGEPAGE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubh is enabled.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhM hjhhubjJ)}(h``__lruvec`` Per-node lruvec holding LRU lists and related parameters. Used only when memory cgroups are disabled. It should not be accessed directly, use ``mem_cgroup_lruvec()`` to look up lruvecs instead. h](jP)}(h ``__lruvec``h]j,)}(hj h]h__lruvec}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhMhj ubji)}(hhh]h)}(hPer-node lruvec holding LRU lists and related parameters. Used only when memory cgroups are disabled. It should not be accessed directly, use ``mem_cgroup_lruvec()`` to look up lruvecs instead.h](hPer-node lruvec holding LRU lists and related parameters. Used only when memory cgroups are disabled. It should not be accessed directly, use }(hj hhhNhNubj,)}(h``mem_cgroup_lruvec()``h]hmem_cgroup_lruvec()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubh to look up lruvecs instead.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubeh}(h]h ]h"]h$]h&]uh1jDhjhhhhhNubeh}(h]generalah ]h"]h$]generalah&]uh1hhjhhhhhKjKubh)}(hhh](h)}(hReclaim controlh]hReclaim control}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ hhhhhMubh)}(h+See also Documentation/mm/page_reclaim.rst.h]h+See also Documentation/mm/page_reclaim.rst.}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ hhubjE)}(hhh](jJ)}(h6``kswapd`` Per-node instance of kswapd kernel thread. h](jP)}(h ``kswapd``h]j,)}(hjh h]hkswapd}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjf ubah}(h]h ]h"]h$]h&]uh1jOhhhMhjb ubji)}(hhh]h)}(h*Per-node instance of kswapd kernel thread.h]h*Per-node instance of kswapd kernel thread.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj} ubah}(h]h ]h"]h$]h&]uh1jhhjb ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhj_ ubjJ)}(hk``kswapd_wait``, ``pfmemalloc_wait``, ``reclaim_wait`` Workqueues used to synchronize memory reclaim tasks h](jP)}(h6``kswapd_wait``, ``pfmemalloc_wait``, ``reclaim_wait``h](j,)}(h``kswapd_wait``h]h kswapd_wait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubh, }(hj hhhNhNubj,)}(h``pfmemalloc_wait``h]hpfmemalloc_wait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubh, }hj sbj,)}(h``reclaim_wait``h]h reclaim_wait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubeh}(h]h ]h"]h$]h&]uh1jOhhhMhj ubji)}(hhh]h)}(h3Workqueues used to synchronize memory reclaim tasksh]h3Workqueues used to synchronize memory reclaim tasks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhj_ hhubjJ)}(h_``nr_writeback_throttled`` Number of tasks that are throttled waiting on dirty pages to clean. h](jP)}(h``nr_writeback_throttled``h]j,)}(hj h]hnr_writeback_throttled}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj ubah}(h]h ]h"]h$]h&]uh1jOhhhMhj ubji)}(hhh]h)}(hCNumber of tasks that are throttled waiting on dirty pages to clean.h]hCNumber of tasks that are throttled waiting on dirty pages to clean.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhj ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhj_ hhubjJ)}(h_``nr_reclaim_start`` Number of pages written while reclaim is throttled waiting for writeback. h](jP)}(h``nr_reclaim_start``h]j,)}(hj5h]hnr_reclaim_start}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj3ubah}(h]h ]h"]h$]h&]uh1jOhhhM hj/ubji)}(hhh]h)}(hINumber of pages written while reclaim is throttled waiting for writeback.h]hINumber of pages written while reclaim is throttled waiting for writeback.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjJubah}(h]h ]h"]h$]h&]uh1jhhj/ubeh}(h]h ]h"]h$]h&]uh1jIhhhM hj_ hhubjJ)}(h<``kswapd_order`` Controls the order kswapd tries to reclaim h](jP)}(h``kswapd_order``h]j,)}(hjmh]h kswapd_order}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjkubah}(h]h ]h"]h$]h&]uh1jOhhhM#hjgubji)}(hhh]h)}(h*Controls the order kswapd tries to reclaimh]h*Controls the order kswapd tries to reclaim}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jhhjgubeh}(h]h ]h"]h$]h&]uh1jIhhhM#hj_ hhubjJ)}(hL``kswapd_highest_zoneidx`` The highest zone index to be reclaimed by kswapd h](jP)}(h``kswapd_highest_zoneidx``h]j,)}(hjh]hkswapd_highest_zoneidx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM&hjubji)}(hhh]h)}(h0The highest zone index to be reclaimed by kswapdh]h0The highest zone index to be reclaimed by kswapd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM&hj_ hhubjJ)}(hJ``kswapd_failures`` Number of runs kswapd was unable to reclaim any pages h](jP)}(h``kswapd_failures``h]j,)}(hjh]hkswapd_failures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM)hjubji)}(hhh]h)}(h5Number of runs kswapd was unable to reclaim any pagesh]h5Number of runs kswapd was unable to reclaim any pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM)hj_ hhubjJ)}(h``min_unmapped_pages`` Minimal number of unmapped file backed pages that cannot be reclaimed. Determined by ``vm.min_unmapped_ratio`` sysctl. Only defined when ``CONFIG_NUMA`` is enabled. h](jP)}(h``min_unmapped_pages``h]j,)}(hjh]hmin_unmapped_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM.hjubji)}(hhh]h)}(hMinimal number of unmapped file backed pages that cannot be reclaimed. Determined by ``vm.min_unmapped_ratio`` sysctl. Only defined when ``CONFIG_NUMA`` is enabled.h](hUMinimal number of unmapped file backed pages that cannot be reclaimed. Determined by }(hj-hhhNhNubj,)}(h``vm.min_unmapped_ratio``h]hvm.min_unmapped_ratio}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj-ubh sysctl. Only defined when }(hj-hhhNhNubj,)}(h``CONFIG_NUMA``h]h CONFIG_NUMA}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj-ubh is enabled.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM,hj*ubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM.hj_ hhubjJ)}(h``min_slab_pages`` Minimal number of SLAB pages that cannot be reclaimed. Determined by ``vm.min_slab_ratio sysctl``. Only defined when ``CONFIG_NUMA`` is enabled h](jP)}(h``min_slab_pages``h]j,)}(hjqh]hmin_slab_pages}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjoubah}(h]h ]h"]h$]h&]uh1jOhhhM2hjkubji)}(hhh]h)}(hMinimal number of SLAB pages that cannot be reclaimed. Determined by ``vm.min_slab_ratio sysctl``. Only defined when ``CONFIG_NUMA`` is enabledh](hEMinimal number of SLAB pages that cannot be reclaimed. Determined by }(hjhhhNhNubj,)}(h``vm.min_slab_ratio sysctl``h]hvm.min_slab_ratio sysctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh. Only defined when }(hjhhhNhNubj,)}(h``CONFIG_NUMA``h]h CONFIG_NUMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is enabled}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM1hjubah}(h]h ]h"]h$]h&]uh1jhhjkubeh}(h]h ]h"]h$]h&]uh1jIhhhM2hj_ hhubjJ)}(h.``flags`` Flags controlling reclaim behavior. h](jP)}(h ``flags``h]j,)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM5hjubji)}(hhh]h)}(h#Flags controlling reclaim behavior.h]h#Flags controlling reclaim behavior.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM5hj_ hhubeh}(h]h ]h"]h$]h&]uh1jDhj@ hhhhhNubeh}(h]reclaim-controlah ]h"]reclaim controlah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hCompaction controlh]hCompaction control}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM8ubjE)}(hhh](jJ)}(hI``kcompactd_max_order`` Page order that kcompactd should try to achieve. h](jP)}(h``kcompactd_max_order``h]j,)}(hj'h]hkcompactd_max_order}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj%ubah}(h]h ]h"]h$]h&]uh1jOhhhM;hj!ubji)}(hhh]h)}(h0Page order that kcompactd should try to achieve.h]h0Page order that kcompactd should try to achieve.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj<ubah}(h]h ]h"]h$]h&]uh1jhhj!ubeh}(h]h ]h"]h$]h&]uh1jIhhhM;hjubjJ)}(hS``kcompactd_highest_zoneidx`` The highest zone index to be compacted by kcompactd. h](jP)}(h``kcompactd_highest_zoneidx``h]j,)}(hj_h]hkcompactd_highest_zoneidx}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubah}(h]h ]h"]h$]h&]uh1jOhhhM>hjYubji)}(hhh]h)}(h4The highest zone index to be compacted by kcompactd.h]h4The highest zone index to be compacted by kcompactd.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjtubah}(h]h ]h"]h$]h&]uh1jhhjYubeh}(h]h ]h"]h$]h&]uh1jIhhhM>hjhhubjJ)}(hJ``kcompactd_wait`` Workqueue used to synchronize memory compaction tasks. h](jP)}(h``kcompactd_wait``h]j,)}(hjh]hkcompactd_wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMAhjubji)}(hhh]h)}(h6Workqueue used to synchronize memory compaction tasks.h]h6Workqueue used to synchronize memory compaction tasks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMAhjhhubjJ)}(h<``kcompactd`` Per-node instance of kcompactd kernel thread. h](jP)}(h ``kcompactd``h]j,)}(hjh]h kcompactd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMDhjubji)}(hhh]h)}(h-Per-node instance of kcompactd kernel thread.h]h-Per-node instance of kcompactd kernel thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMDhjhhubjJ)}(h``proactive_compact_trigger`` Determines if proactive compaction is enabled. Controlled by ``vm.compaction_proactiveness`` sysctl. h](jP)}(h``proactive_compact_trigger``h]j,)}(hjh]hproactive_compact_trigger}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMHhjubji)}(hhh]h)}(hdDetermines if proactive compaction is enabled. Controlled by ``vm.compaction_proactiveness`` sysctl.h](h=Determines if proactive compaction is enabled. Controlled by }(hjhhhNhNubj,)}(h``vm.compaction_proactiveness``h]hvm.compaction_proactiveness}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh sysctl.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMGhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMHhjhhubeh}(h]h ]h"]h$]h&]uh1jDhj hhhhhNubeh}(h]compaction-controlah ]h"]h$]compaction controlah&]uh1hhjhhhhhM8jKubh)}(hhh](h)}(h Statisticsh]h Statistics}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhhhhhMKubjE)}(hhh](jJ)}(h9``per_cpu_nodestats`` Per-CPU VM statistics for the node h](jP)}(h``per_cpu_nodestats``h]j,)}(hjsh]hper_cpu_nodestats}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjqubah}(h]h ]h"]h$]h&]uh1jOhhhMNhjmubji)}(hhh]h)}(h"Per-CPU VM statistics for the nodeh]h"Per-CPU VM statistics for the node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubah}(h]h ]h"]h$]h&]uh1jhhjmubeh}(h]h ]h"]h$]h&]uh1jIhhhMNhjjubjJ)}(h(``vm_stat`` VM statistics for the node. h](jP)}(h ``vm_stat``h]j,)}(hjh]hvm_stat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMQhjubji)}(hhh]h)}(hVM statistics for the node.h]hVM statistics for the node.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMQhjjhhubeh}(h]h ]h"]h$]h&]uh1jDhjYhhhhhNubj )}(h .. _zones:h]h}(h]h ]h"]h$]h&]jzonesuh1j hMShjYhhhhubeh}(h] statisticsah ]h"]h$] statisticsah&]uh1hhjhhhhhMKjKubeh}(h]node-structureah ]h"]node structureah$]h&]uh1hhjhhhhhKubeh}(h](jid1eh ]h"]nodesah$]nodesah&]uh1hhhhhhhhKjKexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hhh](h)}(hZonesh]hZones}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMVubh)}(hXAs we have mentioned, each zone in memory is described by a ``struct zone`` which is an element of the ``node_zones`` array of the node it belongs to. ``struct zone`` is the core data structure of the page allocator. A zone represents a range of physical memory and may have holes.h](h ``ZONE_NORMAL`` > ``ZONE_DMA32``.h](h+The page allocator uses the GFP flags, see }(hj`hhhNhNubh)}(h:ref:`mm-api-gfp-flags`h]j)}(hjjh]hmm-api-gfp-flags}(hjlhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjvreftyperef refexplicitrefwarnjmm-api-gfp-flagsuh1hhhhM\hj`ubhX, specified by a memory allocation to determine the highest zone in a node from which the memory allocation can allocate memory. The page allocator first allocates memory from that zone, if the page allocator can’t allocate the requested amount of memory from the zone, it will allocate memory from the next lower zone in the node, the process continues up to and including the lowest zone. For example, if a node contains }(hj`hhhNhNubj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh, }(hj`hhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh and }(hj`hhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh0 and the highest zone of a memory allocation is }(hj`hhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubhK, the order of the zones from which the page allocator allocates memory is }(hj`hhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh > }(hj`hhhNhNubj,)}(h``ZONE_NORMAL``h]h ZONE_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh > }(hj`hhhNhNubj,)}(h``ZONE_DMA32``h]h ZONE_DMA32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj`ubh.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM\hj hhubh)}(hXAt runtime, free pages in a zone are in the Per-CPU Pagesets (PCP) or free areas of the zone. The Per-CPU Pagesets are a vital mechanism in the kernel's memory management system. By handling most frequent allocations and frees locally on each CPU, the Per-CPU Pagesets improve performance and scalability, especially on systems with many cores. The page allocator in the kernel employs a two-step strategy for memory allocation, starting with the Per-CPU Pagesets before falling back to the buddy allocator. Pages are transferred between the Per-CPU Pagesets and the global free areas (managed by the buddy allocator) in batches. This minimizes the overhead of frequent interactions with the global buddy allocator.h]hXAt runtime, free pages in a zone are in the Per-CPU Pagesets (PCP) or free areas of the zone. The Per-CPU Pagesets are a vital mechanism in the kernel’s memory management system. By handling most frequent allocations and frees locally on each CPU, the Per-CPU Pagesets improve performance and scalability, especially on systems with many cores. The page allocator in the kernel employs a two-step strategy for memory allocation, starting with the Per-CPU Pagesets before falling back to the buddy allocator. Pages are transferred between the Per-CPU Pagesets and the global free areas (managed by the buddy allocator) in batches. This minimizes the overhead of frequent interactions with the global buddy allocator.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj hhubh)}(hGArchitecture specific code calls free_area_init() to initializes zones.h]hGArchitecture specific code calls free_area_init() to initializes zones.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhj hhubh)}(hhh](h)}(hZone structureh]hZone structure}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhMuubh)}(hThe zones structure ``struct zone`` is defined in ``include/linux/mmzone.h``. Here we briefly describe fields of this structure:h](hThe zones structure }(hj=hhhNhNubj,)}(h``struct zone``h]h struct zone}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj=ubh is defined in }(hj=hhhNhNubj,)}(h``include/linux/mmzone.h``h]hinclude/linux/mmzone.h}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj=ubh4. Here we briefly describe fields of this structure:}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhj,hhubh)}(hhh](h)}(hGeneralh]hGeneral}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhMzubjE)}(hhh](jJ)}(hXI``_watermark`` The watermarks for this zone. When the amount of free pages in a zone is below the min watermark, boosting is ignored, an allocation may trigger direct reclaim and direct compaction, it is also used to throttle direct reclaim. When the amount of free pages in a zone is below the low watermark, kswapd is woken up. When the amount of free pages in a zone is above the high watermark, kswapd stops reclaiming (a zone is balanced) when the ``NUMA_BALANCING_MEMORY_TIERING`` bit of ``sysctl_numa_balancing_mode`` is not set. The promo watermark is used for memory tiering and NUMA balancing. When the amount of free pages in a zone is above the promo watermark, kswapd stops reclaiming when the ``NUMA_BALANCING_MEMORY_TIERING`` bit of ``sysctl_numa_balancing_mode`` is set. The watermarks are set by ``__setup_per_zone_wmarks()``. The min watermark is calculated according to ``vm.min_free_kbytes`` sysctl. The other three watermarks are set according to the distance between two watermarks. The distance itself is calculated taking ``vm.watermark_scale_factor`` sysctl into account. h](jP)}(h``_watermark``h]j,)}(hjh]h _watermark}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hX9The watermarks for this zone. When the amount of free pages in a zone is below the min watermark, boosting is ignored, an allocation may trigger direct reclaim and direct compaction, it is also used to throttle direct reclaim. When the amount of free pages in a zone is below the low watermark, kswapd is woken up. When the amount of free pages in a zone is above the high watermark, kswapd stops reclaiming (a zone is balanced) when the ``NUMA_BALANCING_MEMORY_TIERING`` bit of ``sysctl_numa_balancing_mode`` is not set. The promo watermark is used for memory tiering and NUMA balancing. When the amount of free pages in a zone is above the promo watermark, kswapd stops reclaiming when the ``NUMA_BALANCING_MEMORY_TIERING`` bit of ``sysctl_numa_balancing_mode`` is set. The watermarks are set by ``__setup_per_zone_wmarks()``. The min watermark is calculated according to ``vm.min_free_kbytes`` sysctl. The other three watermarks are set according to the distance between two watermarks. The distance itself is calculated taking ``vm.watermark_scale_factor`` sysctl into account.h](hXThe watermarks for this zone. When the amount of free pages in a zone is below the min watermark, boosting is ignored, an allocation may trigger direct reclaim and direct compaction, it is also used to throttle direct reclaim. When the amount of free pages in a zone is below the low watermark, kswapd is woken up. When the amount of free pages in a zone is above the high watermark, kswapd stops reclaiming (a zone is balanced) when the }(hjhhhNhNubj,)}(h!``NUMA_BALANCING_MEMORY_TIERING``h]hNUMA_BALANCING_MEMORY_TIERING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh bit of }(hjhhhNhNubj,)}(h``sysctl_numa_balancing_mode``h]hsysctl_numa_balancing_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is not set. The promo watermark is used for memory tiering and NUMA balancing. When the amount of free pages in a zone is above the promo watermark, kswapd stops reclaiming when the }(hjhhhNhNubj,)}(h!``NUMA_BALANCING_MEMORY_TIERING``h]hNUMA_BALANCING_MEMORY_TIERING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh bit of }(hjhhhNhNubj,)}(h``sysctl_numa_balancing_mode``h]hsysctl_numa_balancing_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh# is set. The watermarks are set by }(hjhhhNhNubj,)}(h``__setup_per_zone_wmarks()``h]h__setup_per_zone_wmarks()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh/. The min watermark is calculated according to }(hjhhhNhNubj,)}(h``vm.min_free_kbytes``h]hvm.min_free_kbytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh sysctl. The other three watermarks are set according to the distance between two watermarks. The distance itself is calculated taking }(hjhhhNhNubj,)}(h``vm.watermark_scale_factor``h]hvm.watermark_scale_factor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh sysctl into account.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjubjJ)}(h``watermark_boost`` The number of pages which are used to boost watermarks to increase reclaim pressure to reduce the likelihood of future fallbacks and wake kswapd now as the node may be balanced overall and kswapd will not wake naturally. h](jP)}(h``watermark_boost``h]j,)}(hj?h]hwatermark_boost}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj=ubah}(h]h ]h"]h$]h&]uh1jOhhhMhj9ubji)}(hhh]h)}(hThe number of pages which are used to boost watermarks to increase reclaim pressure to reduce the likelihood of future fallbacks and wake kswapd now as the node may be balanced overall and kswapd will not wake naturally.h]hThe number of pages which are used to boost watermarks to increase reclaim pressure to reduce the likelihood of future fallbacks and wake kswapd now as the node may be balanced overall and kswapd will not wake naturally.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhhj9ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(he``nr_reserved_highatomic`` The number of pages which are reserved for high-order atomic allocations. h](jP)}(h``nr_reserved_highatomic``h]j,)}(hjwh]hnr_reserved_highatomic}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjuubah}(h]h ]h"]h$]h&]uh1jOhhhMhjqubji)}(hhh]h)}(hIThe number of pages which are reserved for high-order atomic allocations.h]hIThe number of pages which are reserved for high-order atomic allocations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjqubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hR``nr_free_highatomic`` The number of free pages in reserved highatomic pageblocks h](jP)}(h``nr_free_highatomic``h]j,)}(hjh]hnr_free_highatomic}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(h:The number of free pages in reserved highatomic pageblocksh]h:The number of free pages in reserved highatomic pageblocks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX``lowmem_reserve`` The array of the amounts of the memory reserved in this zone for memory allocations. For example, if the highest zone a memory allocation can allocate memory from is ``ZONE_MOVABLE``, the amount of memory reserved in this zone for this allocation is ``lowmem_reserve[ZONE_MOVABLE]`` when attempting to allocate memory from this zone. This is a mechanism the page allocator uses to prevent allocations which could use ``highmem`` from using too much ``lowmem``. For some specialised workloads on ``highmem`` machines, it is dangerous for the kernel to allow process memory to be allocated from the ``lowmem`` zone. This is because that memory could then be pinned via the ``mlock()`` system call, or by unavailability of swapspace. ``vm.lowmem_reserve_ratio`` sysctl determines how aggressive the kernel is in defending these lower zones. This array is recalculated by ``setup_per_zone_lowmem_reserve()`` at runtime if ``vm.lowmem_reserve_ratio`` sysctl changes. h](jP)}(h``lowmem_reserve``h]j,)}(hjh]hlowmem_reserve}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hXThe array of the amounts of the memory reserved in this zone for memory allocations. For example, if the highest zone a memory allocation can allocate memory from is ``ZONE_MOVABLE``, the amount of memory reserved in this zone for this allocation is ``lowmem_reserve[ZONE_MOVABLE]`` when attempting to allocate memory from this zone. This is a mechanism the page allocator uses to prevent allocations which could use ``highmem`` from using too much ``lowmem``. For some specialised workloads on ``highmem`` machines, it is dangerous for the kernel to allow process memory to be allocated from the ``lowmem`` zone. This is because that memory could then be pinned via the ``mlock()`` system call, or by unavailability of swapspace. ``vm.lowmem_reserve_ratio`` sysctl determines how aggressive the kernel is in defending these lower zones. This array is recalculated by ``setup_per_zone_lowmem_reserve()`` at runtime if ``vm.lowmem_reserve_ratio`` sysctl changes.h](hThe array of the amounts of the memory reserved in this zone for memory allocations. For example, if the highest zone a memory allocation can allocate memory from is }(hjhhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhD, the amount of memory reserved in this zone for this allocation is }(hjhhhNhNubj,)}(h ``lowmem_reserve[ZONE_MOVABLE]``h]hlowmem_reserve[ZONE_MOVABLE]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh when attempting to allocate memory from this zone. This is a mechanism the page allocator uses to prevent allocations which could use }(hjhhhNhNubj,)}(h ``highmem``h]hhighmem}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh from using too much }(hjhhhNhNubj,)}(h ``lowmem``h]hlowmem}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh$. For some specialised workloads on }(hjhhhNhNubj,)}(h ``highmem``h]hhighmem}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh[ machines, it is dangerous for the kernel to allow process memory to be allocated from the }(hjhhhNhNubj,)}(h ``lowmem``h]hlowmem}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh@ zone. This is because that memory could then be pinned via the }(hjhhhNhNubj,)}(h ``mlock()``h]hmlock()}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh1 system call, or by unavailability of swapspace. }(hjhhhNhNubj,)}(h``vm.lowmem_reserve_ratio``h]hvm.lowmem_reserve_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhn sysctl determines how aggressive the kernel is in defending these lower zones. This array is recalculated by }(hjhhhNhNubj,)}(h#``setup_per_zone_lowmem_reserve()``h]hsetup_per_zone_lowmem_reserve()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh at runtime if }(hjhhhNhNubj,)}(h``vm.lowmem_reserve_ratio``h]hvm.lowmem_reserve_ratio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh sysctl changes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``node`` The index of the node this zone belongs to. Available only when ``CONFIG_NUMA`` is enabled because there is only one zone in a UMA system. h](jP)}(h``node``h]j,)}(hjh]hnode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hThe index of the node this zone belongs to. Available only when ``CONFIG_NUMA`` is enabled because there is only one zone in a UMA system.h](h@The index of the node this zone belongs to. Available only when }(hjhhhNhNubj,)}(h``CONFIG_NUMA``h]h CONFIG_NUMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh; is enabled because there is only one zone in a UMA system.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hW``zone_pgdat`` Pointer to the ``struct pglist_data`` of the node this zone belongs to. h](jP)}(h``zone_pgdat``h]j,)}(hjh]h zone_pgdat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hGPointer to the ``struct pglist_data`` of the node this zone belongs to.h](hPointer to the }(hj5hhhNhNubj,)}(h``struct pglist_data``h]hstruct pglist_data}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj5ubh" of the node this zone belongs to.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``per_cpu_pageset`` Pointer to the Per-CPU Pagesets (PCP) allocated and initialized by ``setup_zone_pageset()``. By handling most frequent allocations and frees locally on each CPU, PCP improves performance and scalability on systems with many cores. h](jP)}(h``per_cpu_pageset``h]j,)}(hjgh]hper_cpu_pageset}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjeubah}(h]h ]h"]h$]h&]uh1jOhhhMhjaubji)}(hhh]h)}(hPointer to the Per-CPU Pagesets (PCP) allocated and initialized by ``setup_zone_pageset()``. By handling most frequent allocations and frees locally on each CPU, PCP improves performance and scalability on systems with many cores.h](hCPointer to the Per-CPU Pagesets (PCP) allocated and initialized by }(hjhhhNhNubj,)}(h``setup_zone_pageset()``h]hsetup_zone_pageset()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh. By handling most frequent allocations and frees locally on each CPU, PCP improves performance and scalability on systems with many cores.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj|ubah}(h]h ]h"]h$]h&]uh1jhhjaubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h[``pageset_high_min`` Copied to the ``high_min`` of the Per-CPU Pagesets for faster access. h](jP)}(h``pageset_high_min``h]j,)}(hjh]hpageset_high_min}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hECopied to the ``high_min`` of the Per-CPU Pagesets for faster access.h](hCopied to the }(hjhhhNhNubj,)}(h ``high_min``h]hhigh_min}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh+ of the Per-CPU Pagesets for faster access.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h[``pageset_high_max`` Copied to the ``high_max`` of the Per-CPU Pagesets for faster access. h](jP)}(h``pageset_high_max``h]j,)}(hjh]hpageset_high_max}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hECopied to the ``high_max`` of the Per-CPU Pagesets for faster access.h](hCopied to the }(hjhhhNhNubj,)}(h ``high_max``h]hhigh_max}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh+ of the Per-CPU Pagesets for faster access.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX``pageset_batch`` Copied to the ``batch`` of the Per-CPU Pagesets for faster access. The ``batch``, ``high_min`` and ``high_max`` of the Per-CPU Pagesets are used to calculate the number of elements the Per-CPU Pagesets obtain from the buddy allocator under a single hold of the lock for efficiency. They are also used to decide if the Per-CPU Pagesets return pages to the buddy allocator in page free process. h](jP)}(h``pageset_batch``h]j,)}(hjEh]h pageset_batch}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjCubah}(h]h ]h"]h$]h&]uh1jOhhhMhj?ubji)}(hhh]h)}(hXCopied to the ``batch`` of the Per-CPU Pagesets for faster access. The ``batch``, ``high_min`` and ``high_max`` of the Per-CPU Pagesets are used to calculate the number of elements the Per-CPU Pagesets obtain from the buddy allocator under a single hold of the lock for efficiency. They are also used to decide if the Per-CPU Pagesets return pages to the buddy allocator in page free process.h](hCopied to the }(hj]hhhNhNubj,)}(h ``batch``h]hbatch}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubh0 of the Per-CPU Pagesets for faster access. The }(hj]hhhNhNubj,)}(h ``batch``h]hbatch}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubh, }(hj]hhhNhNubj,)}(h ``high_min``h]hhigh_min}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubh and }(hj]hhhNhNubj,)}(h ``high_max``h]hhigh_max}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj]ubhX of the Per-CPU Pagesets are used to calculate the number of elements the Per-CPU Pagesets obtain from the buddy allocator under a single hold of the lock for efficiency. They are also used to decide if the Per-CPU Pagesets return pages to the buddy allocator in page free process.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jhhj?ubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hXg``pageblock_flags`` The pointer to the flags for the pageblocks in the zone (see ``include/linux/pageblock-flags.h`` for flags list). The memory is allocated in ``setup_usemap()``. Each pageblock occupies ``NR_PAGEBLOCK_BITS`` bits. Defined only when ``CONFIG_FLATMEM`` is enabled. The flags is stored in ``mem_section`` when ``CONFIG_SPARSEMEM`` is enabled. h](jP)}(h``pageblock_flags``h]j,)}(hjh]hpageblock_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hXRThe pointer to the flags for the pageblocks in the zone (see ``include/linux/pageblock-flags.h`` for flags list). The memory is allocated in ``setup_usemap()``. Each pageblock occupies ``NR_PAGEBLOCK_BITS`` bits. Defined only when ``CONFIG_FLATMEM`` is enabled. The flags is stored in ``mem_section`` when ``CONFIG_SPARSEMEM`` is enabled.h](h=The pointer to the flags for the pageblocks in the zone (see }(hjhhhNhNubj,)}(h#``include/linux/pageblock-flags.h``h]hinclude/linux/pageblock-flags.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh- for flags list). The memory is allocated in }(hjhhhNhNubj,)}(h``setup_usemap()``h]hsetup_usemap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh. Each pageblock occupies }(hjhhhNhNubj,)}(h``NR_PAGEBLOCK_BITS``h]hNR_PAGEBLOCK_BITS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh bits. Defined only when }(hjhhhNhNubj,)}(h``CONFIG_FLATMEM``h]hCONFIG_FLATMEM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh$ is enabled. The flags is stored in }(hjhhhNhNubj,)}(h``mem_section``h]h mem_section}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh when }(hjhhhNhNubj,)}(h``CONFIG_SPARSEMEM``h]hCONFIG_SPARSEMEM}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is enabled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hd``zone_start_pfn`` The start pfn of the zone. It is initialized by ``calculate_node_totalpages()``. h](jP)}(h``zone_start_pfn``h]j,)}(hjih]hzone_start_pfn}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjgubah}(h]h ]h"]h$]h&]uh1jOhhhMhjcubji)}(hhh]h)}(hPThe start pfn of the zone. It is initialized by ``calculate_node_totalpages()``.h](h0The start pfn of the zone. It is initialized by }(hjhhhNhNubj,)}(h``calculate_node_totalpages()``h]hcalculate_node_totalpages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jhhjcubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX``managed_pages`` The present pages managed by the buddy system, which is calculated as: ``managed_pages`` = ``present_pages`` - ``reserved_pages``, ``reserved_pages`` includes pages allocated by the memblock allocator. It should be used by page allocator and vm scanner to calculate all kinds of watermarks and thresholds. It is accessed using ``atomic_long_xxx()`` functions. It is initialized in ``free_area_init_core()`` and then is reinitialized when memblock allocator frees pages into buddy system. h](jP)}(h``managed_pages``h]j,)}(hjh]h managed_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hXThe present pages managed by the buddy system, which is calculated as: ``managed_pages`` = ``present_pages`` - ``reserved_pages``, ``reserved_pages`` includes pages allocated by the memblock allocator. It should be used by page allocator and vm scanner to calculate all kinds of watermarks and thresholds. It is accessed using ``atomic_long_xxx()`` functions. It is initialized in ``free_area_init_core()`` and then is reinitialized when memblock allocator frees pages into buddy system.h](hGThe present pages managed by the buddy system, which is calculated as: }(hjhhhNhNubj,)}(h``managed_pages``h]h managed_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh = }(hjhhhNhNubj,)}(h``present_pages``h]h present_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh - }(hjhhhNhNubj,)}(h``reserved_pages``h]hreserved_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh, }(hjhhhNhNubj,)}(h``reserved_pages``h]hreserved_pages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh includes pages allocated by the memblock allocator. It should be used by page allocator and vm scanner to calculate all kinds of watermarks and thresholds. It is accessed using }(hjhhhNhNubj,)}(h``atomic_long_xxx()``h]hatomic_long_xxx()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh! functions. It is initialized in }(hjhhhNhNubj,)}(h``free_area_init_core()``h]hfree_area_init_core()}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhQ and then is reinitialized when memblock allocator frees pages into buddy system.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``spanned_pages`` The total pages spanned by the zone, including holes, which is calculated as: ``spanned_pages`` = ``zone_end_pfn`` - ``zone_start_pfn``. It is initialized by ``calculate_node_totalpages()``. h](jP)}(h``spanned_pages``h]j,)}(hjWh]h spanned_pages}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjUubah}(h]h ]h"]h$]h&]uh1jOhhhMhjQubji)}(hhh]h)}(hThe total pages spanned by the zone, including holes, which is calculated as: ``spanned_pages`` = ``zone_end_pfn`` - ``zone_start_pfn``. It is initialized by ``calculate_node_totalpages()``.h](hNThe total pages spanned by the zone, including holes, which is calculated as: }(hjohhhNhNubj,)}(h``spanned_pages``h]h spanned_pages}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjoubh = }(hjohhhNhNubj,)}(h``zone_end_pfn``h]h zone_end_pfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjoubh - }(hjohhhNhNubj,)}(h``zone_start_pfn``h]hzone_start_pfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjoubh. It is initialized by }(hjohhhNhNubj,)}(h``calculate_node_totalpages()``h]hcalculate_node_totalpages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjoubh.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjlubah}(h]h ]h"]h$]h&]uh1jhhjQubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX@``present_pages`` The physical pages existing within the zone, which is calculated as: ``present_pages`` = ``spanned_pages`` - ``absent_pages`` (pages in holes). It may be used by memory hotplug or memory power management logic to figure out unmanaged pages by checking (``present_pages`` - ``managed_pages``). Write access to ``present_pages`` at runtime should be protected by ``mem_hotplug_begin/done()``. Any reader who can't tolerant drift of ``present_pages`` should use ``get_online_mems()`` to get a stable value. It is initialized by ``calculate_node_totalpages()``. h](jP)}(h``present_pages``h]j,)}(hjh]h present_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hX-The physical pages existing within the zone, which is calculated as: ``present_pages`` = ``spanned_pages`` - ``absent_pages`` (pages in holes). It may be used by memory hotplug or memory power management logic to figure out unmanaged pages by checking (``present_pages`` - ``managed_pages``). Write access to ``present_pages`` at runtime should be protected by ``mem_hotplug_begin/done()``. Any reader who can't tolerant drift of ``present_pages`` should use ``get_online_mems()`` to get a stable value. It is initialized by ``calculate_node_totalpages()``.h](hEThe physical pages existing within the zone, which is calculated as: }(hjhhhNhNubj,)}(h``present_pages``h]h present_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh = }(hjhhhNhNubj,)}(h``spanned_pages``h]h spanned_pages}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh - }(hjhhhNhNubj,)}(h``absent_pages``h]h absent_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh (pages in holes). It may be used by memory hotplug or memory power management logic to figure out unmanaged pages by checking (}(hjhhhNhNubj,)}(h``present_pages``h]h present_pages}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh - }hjsbj,)}(h``managed_pages``h]h managed_pages}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh). Write access to }(hjhhhNhNubj,)}(h``present_pages``h]h present_pages}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh# at runtime should be protected by }(hjhhhNhNubj,)}(h``mem_hotplug_begin/done()``h]hmem_hotplug_begin/done()}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh+. Any reader who can’t tolerant drift of }(hjhhhNhNubj,)}(h``present_pages``h]h present_pages}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh should use }(hjhhhNhNubj,)}(h``get_online_mems()``h]hget_online_mems()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh- to get a stable value. It is initialized by }(hjhhhNhNubj,)}(h``calculate_node_totalpages()``h]hcalculate_node_totalpages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``present_early_pages`` The present pages existing within the zone located on memory available since early boot, excluding hotplugged memory. Defined only when ``CONFIG_MEMORY_HOTPLUG`` is enabled and initialized by ``calculate_node_totalpages()``. h](jP)}(h``present_early_pages``h]j,)}(hjh]hpresent_early_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hThe present pages existing within the zone located on memory available since early boot, excluding hotplugged memory. Defined only when ``CONFIG_MEMORY_HOTPLUG`` is enabled and initialized by ``calculate_node_totalpages()``.h](hThe present pages existing within the zone located on memory available since early boot, excluding hotplugged memory. Defined only when }(hjhhhNhNubj,)}(h``CONFIG_MEMORY_HOTPLUG``h]hCONFIG_MEMORY_HOTPLUG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is enabled and initialized by }(hjhhhNhNubj,)}(h``calculate_node_totalpages()``h]hcalculate_node_totalpages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``cma_pages`` The pages reserved for CMA use. These pages behave like ``ZONE_MOVABLE`` when they are not used for CMA. Defined only when ``CONFIG_CMA`` is enabled. h](jP)}(h ``cma_pages``h]j,)}(hjh]h cma_pages}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hThe pages reserved for CMA use. These pages behave like ``ZONE_MOVABLE`` when they are not used for CMA. Defined only when ``CONFIG_CMA`` is enabled.h](h8The pages reserved for CMA use. These pages behave like }(hj7hhhNhNubj,)}(h``ZONE_MOVABLE``h]h ZONE_MOVABLE}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj7ubh3 when they are not used for CMA. Defined only when }(hj7hhhNhNubj,)}(h``CONFIG_CMA``h]h CONFIG_CMA}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj7ubh is enabled.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hi``name`` The name of the zone. It is a pointer to the corresponding element of the ``zone_names`` array. h](jP)}(h``name``h]j,)}(hj{h]hname}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjyubah}(h]h ]h"]h$]h&]uh1jOhhhMhjuubji)}(hhh]h)}(h_The name of the zone. It is a pointer to the corresponding element of the ``zone_names`` array.h](hJThe name of the zone. It is a pointer to the corresponding element of the }(hjhhhNhNubj,)}(h``zone_names``h]h zone_names}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh array.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjuubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(h``nr_isolate_pageblock`` Number of isolated pageblocks. It is used to solve incorrect freepage counting problem due to racy retrieving migratetype of pageblock. Protected by ``zone->lock``. Defined only when ``CONFIG_MEMORY_ISOLATION`` is enabled. h](jP)}(h``nr_isolate_pageblock``h]j,)}(hjh]hnr_isolate_pageblock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hNumber of isolated pageblocks. It is used to solve incorrect freepage counting problem due to racy retrieving migratetype of pageblock. Protected by ``zone->lock``. Defined only when ``CONFIG_MEMORY_ISOLATION`` is enabled.h](hNumber of isolated pageblocks. It is used to solve incorrect freepage counting problem due to racy retrieving migratetype of pageblock. Protected by }(hjhhhNhNubj,)}(h``zone->lock``h]h zone->lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh. Defined only when }(hjhhhNhNubj,)}(h``CONFIG_MEMORY_ISOLATION``h]hCONFIG_MEMORY_ISOLATION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is enabled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX.``span_seqlock`` The seqlock to protect ``zone_start_pfn`` and ``spanned_pages``. It is a seqlock because it has to be read outside of ``zone->lock``, and it is done in the main allocator path. However, the seqlock is written quite infrequently. Defined only when ``CONFIG_MEMORY_HOTPLUG`` is enabled. h](jP)}(h``span_seqlock``h]j,)}(hj!h]h span_seqlock}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hXThe seqlock to protect ``zone_start_pfn`` and ``spanned_pages``. It is a seqlock because it has to be read outside of ``zone->lock``, and it is done in the main allocator path. However, the seqlock is written quite infrequently. Defined only when ``CONFIG_MEMORY_HOTPLUG`` is enabled.h](hThe seqlock to protect }(hj9hhhNhNubj,)}(h``zone_start_pfn``h]hzone_start_pfn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj9ubh and }(hj9hhhNhNubj,)}(h``spanned_pages``h]h spanned_pages}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj9ubh7. It is a seqlock because it has to be read outside of }(hj9hhhNhNubj,)}(h``zone->lock``h]h zone->lock}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj9ubhs, and it is done in the main allocator path. However, the seqlock is written quite infrequently. Defined only when }(hj9hhhNhNubj,)}(h``CONFIG_MEMORY_HOTPLUG``h]hCONFIG_MEMORY_HOTPLUG}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj9ubh is enabled.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(ht``initialized`` The flag indicating if the zone is initialized. Set by ``init_currently_empty_zone()`` during boot. h](jP)}(h``initialized``h]j,)}(hjh]h initialized}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhMhjubji)}(hhh]h)}(hcThe flag indicating if the zone is initialized. Set by ``init_currently_empty_zone()`` during boot.h](h7The flag indicating if the zone is initialized. Set by }(hjhhhNhNubj,)}(h``init_currently_empty_zone()``h]hinit_currently_empty_zone()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh during boot.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhMhjhhubjJ)}(hX ``free_area`` The array of free areas, where each element corresponds to a specific order which is a power of two. The buddy allocator uses this structure to manage free memory efficiently. When allocating, it tries to find the smallest sufficient block, if the smallest sufficient block is larger than the requested size, it will be recursively split into the next smaller blocks until the required size is reached. When a page is freed, it may be merged with its buddy to form a larger block. It is initialized by ``zone_init_free_lists()``. h](jP)}(h ``free_area``h]j,)}(hjh]h free_area}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM hjubji)}(hhh]h)}(hXThe array of free areas, where each element corresponds to a specific order which is a power of two. The buddy allocator uses this structure to manage free memory efficiently. When allocating, it tries to find the smallest sufficient block, if the smallest sufficient block is larger than the requested size, it will be recursively split into the next smaller blocks until the required size is reached. When a page is freed, it may be merged with its buddy to form a larger block. It is initialized by ``zone_init_free_lists()``.h](hXThe array of free areas, where each element corresponds to a specific order which is a power of two. The buddy allocator uses this structure to manage free memory efficiently. When allocating, it tries to find the smallest sufficient block, if the smallest sufficient block is larger than the requested size, it will be recursively split into the next smaller blocks until the required size is reached. When a page is freed, it may be merged with its buddy to form a larger block. It is initialized by }(hjhhhNhNubj,)}(h``zone_init_free_lists()``h]hzone_init_free_lists()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM hjhhubjJ)}(h``unaccepted_pages`` The list of pages to be accepted. All pages on the list are ``MAX_PAGE_ORDER``. Defined only when ``CONFIG_UNACCEPTED_MEMORY`` is enabled. h](jP)}(h``unaccepted_pages``h]j,)}(hj5h]hunaccepted_pages}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hj3ubah}(h]h ]h"]h$]h&]uh1jOhhhMhj/ubji)}(hhh]h)}(hThe list of pages to be accepted. All pages on the list are ``MAX_PAGE_ORDER``. Defined only when ``CONFIG_UNACCEPTED_MEMORY`` is enabled.h](h ah&]uh1hhj,hhhhhMzjKubh)}(hhh](h)}(hCompaction controlh]hCompaction control}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM"ubjE)}(hhh](jJ)}(ha``compact_cached_free_pfn`` The PFN where compaction free scanner should start in the next scan. h](jP)}(h``compact_cached_free_pfn``h]j,)}(hjh]hcompact_cached_free_pfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM%hjubji)}(hhh]h)}(hDThe PFN where compaction free scanner should start in the next scan.h]hDThe PFN where compaction free scanner should start in the next scan.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM%hjubjJ)}(h``compact_cached_migrate_pfn`` The PFNs where compaction migration scanner should start in the next scan. This array has two elements: the first one is used in ``MIGRATE_ASYNC`` mode, and the other one is used in ``MIGRATE_SYNC`` mode. h](jP)}(h``compact_cached_migrate_pfn``h]j,)}(hjh]hcompact_cached_migrate_pfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM*hjubji)}(hhh]h)}(hThe PFNs where compaction migration scanner should start in the next scan. This array has two elements: the first one is used in ``MIGRATE_ASYNC`` mode, and the other one is used in ``MIGRATE_SYNC`` mode.h](hThe PFNs where compaction migration scanner should start in the next scan. This array has two elements: the first one is used in }(hjhhhNhNubj,)}(h``MIGRATE_ASYNC``h]h MIGRATE_ASYNC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh$ mode, and the other one is used in }(hjhhhNhNubj,)}(h``MIGRATE_SYNC``h]h MIGRATE_SYNC}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh mode.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM*hjhhubjJ)}(h``compact_init_migrate_pfn`` The initial migration PFN which is initialized to 0 at boot time, and to the first pageblock with migratable pages in the zone after a full compaction finishes. It is used to check if a scan is a whole zone scan or not. h](jP)}(h``compact_init_migrate_pfn``h]j,)}(hjZh]hcompact_init_migrate_pfn}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjXubah}(h]h ]h"]h$]h&]uh1jOhhhM/hjTubji)}(hhh]h)}(hThe initial migration PFN which is initialized to 0 at boot time, and to the first pageblock with migratable pages in the zone after a full compaction finishes. It is used to check if a scan is a whole zone scan or not.h]hThe initial migration PFN which is initialized to 0 at boot time, and to the first pageblock with migratable pages in the zone after a full compaction finishes. It is used to check if a scan is a whole zone scan or not.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjoubah}(h]h ]h"]h$]h&]uh1jhhjTubeh}(h]h ]h"]h$]h&]uh1jIhhhM/hjhhubjJ)}(h``compact_init_free_pfn`` The initial free PFN which is initialized to 0 at boot time and to the last pageblock with free ``MIGRATE_MOVABLE`` pages in the zone. It is used to check if it is the start of a scan. h](jP)}(h``compact_init_free_pfn``h]j,)}(hjh]hcompact_init_free_pfn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM4hjubji)}(hhh]h)}(hThe initial free PFN which is initialized to 0 at boot time and to the last pageblock with free ``MIGRATE_MOVABLE`` pages in the zone. It is used to check if it is the start of a scan.h](h`The initial free PFN which is initialized to 0 at boot time and to the last pageblock with free }(hjhhhNhNubj,)}(h``MIGRATE_MOVABLE``h]hMIGRATE_MOVABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhE pages in the zone. It is used to check if it is the start of a scan.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM2hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM4hjhhubjJ)}(hX'``compact_considered`` The number of compactions attempted since last failure. It is reset in ``defer_compaction()`` when a compaction fails to result in a page allocation success. It is increased by 1 in ``compaction_deferred()`` when a compaction should be skipped. ``compaction_deferred()`` is called before ``compact_zone()`` is called, ``compaction_defer_reset()`` is called when ``compact_zone()`` returns ``COMPACT_SUCCESS``, ``defer_compaction()`` is called when ``compact_zone()`` returns ``COMPACT_PARTIAL_SKIPPED`` or ``COMPACT_COMPLETE``. h](jP)}(h``compact_considered``h]j,)}(hjh]hcompact_considered}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubah}(h]h ]h"]h$]h&]uh1jOhhhM>hjubji)}(hhh]h)}(hXThe number of compactions attempted since last failure. It is reset in ``defer_compaction()`` when a compaction fails to result in a page allocation success. It is increased by 1 in ``compaction_deferred()`` when a compaction should be skipped. ``compaction_deferred()`` is called before ``compact_zone()`` is called, ``compaction_defer_reset()`` is called when ``compact_zone()`` returns ``COMPACT_SUCCESS``, ``defer_compaction()`` is called when ``compact_zone()`` returns ``COMPACT_PARTIAL_SKIPPED`` or ``COMPACT_COMPLETE``.h](hGThe number of compactions attempted since last failure. It is reset in }(hjhhhNhNubj,)}(h``defer_compaction()``h]hdefer_compaction()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubhY when a compaction fails to result in a page allocation success. It is increased by 1 in }(hjhhhNhNubj,)}(h``compaction_deferred()``h]hcompaction_deferred()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh& when a compaction should be skipped. }(hjhhhNhNubj,)}(h``compaction_deferred()``h]hcompaction_deferred()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is called before }(hjhhhNhNubj,)}(h``compact_zone()``h]hcompact_zone()}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is called, }(hjhhhNhNubj,)}(h``compaction_defer_reset()``h]hcompaction_defer_reset()}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is called when }(hjhhhNhNubj,)}(h``compact_zone()``h]hcompact_zone()}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh returns }(hjhhhNhNubj,)}(h``COMPACT_SUCCESS``h]hCOMPACT_SUCCESS}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh, }(hjhhhNhNubj,)}(h``defer_compaction()``h]hdefer_compaction()}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh is called when }(hjhhhNhNubj,)}(h``compact_zone()``h]hcompact_zone()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh returns }hjsbj,)}(h``COMPACT_PARTIAL_SKIPPED``h]hCOMPACT_PARTIAL_SKIPPED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh or }(hjhhhNhNubj,)}(h``COMPACT_COMPLETE``h]hCOMPACT_COMPLETE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j+hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM7hjubah}(h]h ]h"]h$]h&]uh1jhhjubeh}(h]h ]h"]h$]h&]uh1jIhhhM>hjhhubjJ)}(hX:``compact_defer_shift`` The number of compactions skipped before trying again is ``1<