€•Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ*/translations/zh_CN/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/admin-guide/mm/pagemap”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒExamining Process Page Tables”h]”hŒExamining Process Page Tables”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒD/var/lib/git/docbuild/linux/Documentation/admin-guide/mm/pagemap.rst”h´KubhŒ paragraph”“”)�”}”(hŒ¯pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow userspace programs to examine the page tables and related information by reading files in ``/proc``.”h]”(hŒ¥pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow userspace programs to examine the page tables and related information by reading files in ”…”�”}”(hhÍh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ ``/proc``”h]”hŒ/proc”…”�”}”(hh×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhhÍubhŒ.”…”�”}”(hhÍh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒ%There are four components to pagemap:”h]”hŒ%There are four components to pagemap:”…”�”}”(hhïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubhŒ block_quote”“”)�”}”(hXÉ * ``/proc/pid/pagemap``. This file lets a userspace process find out which physical frame each virtual page is mapped to. It contains one 64-bit value for each virtual page, containing the following data (from ``fs/proc/task_mmu.c``, above pagemap_read): * Bits 0-54 page frame number (PFN) if present * Bits 0-4 swap type if swapped * Bits 5-54 swap offset if swapped * Bit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst) * Bit 56 page exclusively mapped (since 4.2) * Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ``VM_UFFD_WP`` VMA this indicates a write-protected PTE; in a ``VM_UFFD_RWP`` VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst. * Bit 58 pte is a guard region (since 6.15) (see madvise (2) man page) * Bits 59-60 zero * Bit 61 page is file-page or shared-anon (since 3.5) * Bit 62 page swapped * Bit 63 page present Since Linux 4.0 only users with the CAP_SYS_ADMIN capability can get PFNs. In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from 4.2 the PFN field is zeroed if the user does not have CAP_SYS_ADMIN. Reason: information about PFNs helps in exploiting Rowhammer vulnerability. If the page is not present but in swap, then the PFN contains an encoding of the swap file number and the page's offset into the swap. Unmapped pages return a null PFN. This allows determining precisely which pages are mapped (or in swap) and comparing mapped pages between processes. Traditionally, bit 56 indicates that a page is mapped exactly once and bit 56 is clear when a page is mapped multiple times, even when mapped in the same process multiple times. In some kernel configurations, the semantics for pages part of a larger allocation (e.g., THP) can differ: bit 56 is set if all pages part of the corresponding large allocation are *certainly* mapped in the same process, even if the page is mapped multiple times in that process. Bit 56 is clear when any page page of the larger allocation is *maybe* mapped in a different process. In some cases, a large allocation might be treated as "maybe mapped by multiple processes" even though this is no longer the case. Efficient users of this interface will use ``/proc/pid/maps`` to determine which areas of memory are actually mapped and llseek to skip over unmapped regions. * ``/proc/kpagecount``. This file contains a 64-bit count of the number of times each page is mapped, indexed by PFN. Some kernel configurations do not track the precise number of times a page part of a larger allocation (e.g., THP) is mapped. In these configurations, the average number of mappings per page in this larger allocation is returned instead. However, if any page of the large allocation is mapped, the returned value will be at least 1. ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hX¤ ``/proc/pid/pagemap``. This file lets a userspace process find out which physical frame each virtual page is mapped to. It contains one 64-bit value for each virtual page, containing the following data (from ``fs/proc/task_mmu.c``, above pagemap_read): * Bits 0-54 page frame number (PFN) if present * Bits 0-4 swap type if swapped * Bits 5-54 swap offset if swapped * Bit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst) * Bit 56 page exclusively mapped (since 4.2) * Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ``VM_UFFD_WP`` VMA this indicates a write-protected PTE; in a ``VM_UFFD_RWP`` VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst. * Bit 58 pte is a guard region (since 6.15) (see madvise (2) man page) * Bits 59-60 zero * Bit 61 page is file-page or shared-anon (since 3.5) * Bit 62 page swapped * Bit 63 page present Since Linux 4.0 only users with the CAP_SYS_ADMIN capability can get PFNs. In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from 4.2 the PFN field is zeroed if the user does not have CAP_SYS_ADMIN. Reason: information about PFNs helps in exploiting Rowhammer vulnerability. If the page is not present but in swap, then the PFN contains an encoding of the swap file number and the page's offset into the swap. Unmapped pages return a null PFN. This allows determining precisely which pages are mapped (or in swap) and comparing mapped pages between processes. Traditionally, bit 56 indicates that a page is mapped exactly once and bit 56 is clear when a page is mapped multiple times, even when mapped in the same process multiple times. In some kernel configurations, the semantics for pages part of a larger allocation (e.g., THP) can differ: bit 56 is set if all pages part of the corresponding large allocation are *certainly* mapped in the same process, even if the page is mapped multiple times in that process. Bit 56 is clear when any page page of the larger allocation is *maybe* mapped in a different process. In some cases, a large allocation might be treated as "maybe mapped by multiple processes" even though this is no longer the case. Efficient users of this interface will use ``/proc/pid/maps`` to determine which areas of memory are actually mapped and llseek to skip over unmapped regions. ”h]”(hÌ)�”}”(hŒþ``/proc/pid/pagemap``. This file lets a userspace process find out which physical frame each virtual page is mapped to. It contains one 64-bit value for each virtual page, containing the following data (from ``fs/proc/task_mmu.c``, above pagemap_read):”h]”(hÖ)�”}”(hŒ``/proc/pid/pagemap``”h]”hŒ/proc/pid/pagemap”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ½. This file lets a userspace process find out which physical frame each virtual page is mapped to. It contains one 64-bit value for each virtual page, containing the following data (from ”…”�”}”(hjh²hh³Nh´NubhÖ)�”}”(hŒ``fs/proc/task_mmu.c``”h]”hŒfs/proc/task_mmu.c”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ, above pagemap_read):”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj ubhþ)�”}”(hXÿ* Bits 0-54 page frame number (PFN) if present * Bits 0-4 swap type if swapped * Bits 5-54 swap offset if swapped * Bit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst) * Bit 56 page exclusively mapped (since 4.2) * Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ``VM_UFFD_WP`` VMA this indicates a write-protected PTE; in a ``VM_UFFD_RWP`` VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst. * Bit 58 pte is a guard region (since 6.15) (see madvise (2) man page) * Bits 59-60 zero * Bit 61 page is file-page or shared-anon (since 3.5) * Bit 62 page swapped * Bit 63 page present ”h]”j)�”}”(hhh]”(j )�”}”(hŒ-Bits 0-54 page frame number (PFN) if present”h]”hÌ)�”}”(hjEh]”hŒ-Bits 0-54 page frame number (PFN) if present”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒBits 0-4 swap type if swapped”h]”hÌ)�”}”(hj\h]”hŒBits 0-4 swap type if swapped”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjZubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒ!Bits 5-54 swap offset if swapped”h]”hÌ)�”}”(hjsh]”hŒ!Bits 5-54 swap offset if swapped”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjqubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒNBit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)”h]”hÌ)�”}”(hŒNBit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)”h]”hŒNBit 55 pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒ.Bit 56 page exclusively mapped (since 4.2)”h]”hÌ)�”}”(hj¢h]”hŒ.Bit 56 page exclusively mapped (since 4.2)”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hX/Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ``VM_UFFD_WP`` VMA this indicates a write-protected PTE; in a ``VM_UFFD_RWP`` VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst.”h]”hÌ)�”}”(hX/Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ``VM_UFFD_WP`` VMA this indicates a write-protected PTE; in a ``VM_UFFD_RWP`` VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst.”h]”(hŒ?Bit 57 pte is tracked by userfaultfd (since 5.13) — in a ”…”�”}”(hj»h²hh³Nh´NubhÖ)�”}”(hŒ``VM_UFFD_WP``”h]”hŒ VM_UFFD_WP”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj»ubhŒ0 VMA this indicates a write-protected PTE; in a ”…”�”}”(hj»h²hh³Nh´NubhÖ)�”}”(hŒ``VM_UFFD_RWP``”h]”hŒ VM_UFFD_RWP”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj»ubhŒ£ VMA it indicates an RWP-protected PTE. WP and RWP are mutually exclusive per VMA, so the meaning is unambiguous. See Documentation/admin-guide/mm/userfaultfd.rst.”…”�”}”(hj»h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒHBit 58 pte is a guard region (since 6.15) (see madvise (2) man page)”h]”hÌ)�”}”(hjõh]”hŒHBit 58 pte is a guard region (since 6.15) (see madvise (2) man page)”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒBits 59-60 zero”h]”hÌ)�”}”(hj h]”hŒBits 59-60 zero”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒ7Bit 61 page is file-page or shared-anon (since 3.5)”h]”hÌ)�”}”(hj#h]”hŒ7Bit 61 page is file-page or shared-anon (since 3.5)”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒBit 62 page swapped”h]”hÌ)�”}”(hj:h]”hŒBit 62 page swapped”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubj )�”}”(hŒBit 63 page present ”h]”hÌ)�”}”(hŒBit 63 page present”h]”hŒBit 63 page present”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj@ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jh³hÊh´Khj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´Khj ubhÌ)�”}”(hX!Since Linux 4.0 only users with the CAP_SYS_ADMIN capability can get PFNs. In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from 4.2 the PFN field is zeroed if the user does not have CAP_SYS_ADMIN. Reason: information about PFNs helps in exploiting Rowhammer vulnerability.”h]”hX!Since Linux 4.0 only users with the CAP_SYS_ADMIN capability can get PFNs. In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from 4.2 the PFN field is zeroed if the user does not have CAP_SYS_ADMIN. Reason: information about PFNs helps in exploiting Rowhammer vulnerability.”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K!hj ubhÌ)�”}”(hXIf the page is not present but in swap, then the PFN contains an encoding of the swap file number and the page's offset into the swap. Unmapped pages return a null PFN. This allows determining precisely which pages are mapped (or in swap) and comparing mapped pages between processes.”h]”hXIf the page is not present but in swap, then the PFN contains an encoding of the swap file number and the page’s offset into the swap. Unmapped pages return a null PFN. This allows determining precisely which pages are mapped (or in swap) and comparing mapped pages between processes.”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K&hj ubhÌ)�”}”(hX²Traditionally, bit 56 indicates that a page is mapped exactly once and bit 56 is clear when a page is mapped multiple times, even when mapped in the same process multiple times. In some kernel configurations, the semantics for pages part of a larger allocation (e.g., THP) can differ: bit 56 is set if all pages part of the corresponding large allocation are *certainly* mapped in the same process, even if the page is mapped multiple times in that process. Bit 56 is clear when any page page of the larger allocation is *maybe* mapped in a different process. In some cases, a large allocation might be treated as "maybe mapped by multiple processes" even though this is no longer the case.”h]”(hXgTraditionally, bit 56 indicates that a page is mapped exactly once and bit 56 is clear when a page is mapped multiple times, even when mapped in the same process multiple times. In some kernel configurations, the semantics for pages part of a larger allocation (e.g., THP) can differ: bit 56 is set if all pages part of the corresponding large allocation are ”…”�”}”(hj‘h²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ *certainly*”h]”hŒ certainly”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j™hj‘ubhŒ— mapped in the same process, even if the page is mapped multiple times in that process. Bit 56 is clear when any page page of the larger allocation is ”…”�”}”(hj‘h²hh³Nh´Nubjš)�”}”(hŒ*maybe*”h]”hŒmaybe”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j™hj‘ubhŒ¦ mapped in a different process. In some cases, a large allocation might be treated as “maybe mapped by multiple processesâ€� even though this is no longer the case.”…”�”}”(hj‘h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hj ubhÌ)�”}”(hŒžEfficient users of this interface will use ``/proc/pid/maps`` to determine which areas of memory are actually mapped and llseek to skip over unmapped regions.”h]”(hŒ+Efficient users of this interface will use ”…”�”}”(hjÅh²hh³Nh´NubhÖ)�”}”(hŒ``/proc/pid/maps``”h]”hŒ/proc/pid/maps”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjÅubhŒa to determine which areas of memory are actually mapped and llseek to skip over unmapped regions.”…”�”}”(hjÅh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K7hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj )�”}”(hXÂ``/proc/kpagecount``. This file contains a 64-bit count of the number of times each page is mapped, indexed by PFN. Some kernel configurations do not track the precise number of times a page part of a larger allocation (e.g., THP) is mapped. In these configurations, the average number of mappings per page in this larger allocation is returned instead. However, if any page of the large allocation is mapped, the returned value will be at least 1. ”h]”hÌ)�”}”(hXÁ``/proc/kpagecount``. This file contains a 64-bit count of the number of times each page is mapped, indexed by PFN. Some kernel configurations do not track the precise number of times a page part of a larger allocation (e.g., THP) is mapped. In these configurations, the average number of mappings per page in this larger allocation is returned instead. However, if any page of the large allocation is mapped, the returned value will be at least 1.”h]”(hÖ)�”}”(hŒ``/proc/kpagecount``”h]”hŒ/proc/kpagecount”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjïubhX­. This file contains a 64-bit count of the number of times each page is mapped, indexed by PFN. Some kernel configurations do not track the precise number of times a page part of a larger allocation (e.g., THP) is mapped. In these configurations, the average number of mappings per page in this larger allocation is returned instead. However, if any page of the large allocation is mapped, the returned value will be at least 1.”…”�”}”(hjïh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjëubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”jmjnuh1jh³hÊh´K hhÿubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´K hh·h²hubhÌ)�”}”(hŒhThe page-types tool in the tools/mm directory can be used to query the number of times a page is mapped.”h]”hŒhThe page-types tool in the tools/mm directory can be used to query the number of times a page is mapped.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KChh·h²hubhþ)�”}”(hXÜ* ``/proc/kpageflags``. This file contains a 64-bit set of flags for each page, indexed by PFN. The flags are (from ``include/uapi/linux/kernel-page-flags.h``): 0. LOCKED 1. ERROR 2. REFERENCED 3. UPTODATE 4. DIRTY 5. LRU 6. ACTIVE 7. SLAB 8. WRITEBACK 9. RECLAIM 10. BUDDY 11. MMAP 12. ANON 13. SWAPCACHE 14. SWAPBACKED 15. COMPOUND_HEAD 16. COMPOUND_TAIL 17. HUGE 18. UNEVICTABLE 19. HWPOISON 20. NOPAGE 21. KSM 22. THP 23. OFFLINE 24. ZERO_PAGE 25. IDLE 26. PGTABLE * ``/proc/kpagecgroup``. This file contains a 64-bit inode number of the memory cgroup each page is charged to, indexed by PFN. Only available when CONFIG_MEMCG is set. ”h]”j)�”}”(hhh]”(j )�”}”(hXñ``/proc/kpageflags``. This file contains a 64-bit set of flags for each page, indexed by PFN. The flags are (from ``include/uapi/linux/kernel-page-flags.h``): 0. LOCKED 1. ERROR 2. REFERENCED 3. UPTODATE 4. DIRTY 5. LRU 6. ACTIVE 7. SLAB 8. WRITEBACK 9. RECLAIM 10. BUDDY 11. MMAP 12. ANON 13. SWAPCACHE 14. SWAPBACKED 15. COMPOUND_HEAD 16. COMPOUND_TAIL 17. HUGE 18. UNEVICTABLE 19. HWPOISON 20. NOPAGE 21. KSM 22. THP 23. OFFLINE 24. ZERO_PAGE 25. IDLE 26. PGTABLE ”h]”(hÌ)�”}”(hŒ^``/proc/kpageflags``. This file contains a 64-bit set of flags for each page, indexed by PFN.”h]”(hÖ)�”}”(hŒ``/proc/kpageflags``”h]”hŒ/proc/kpageflags”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj6ubhŒJ. This file contains a 64-bit set of flags for each page, indexed by PFN.”…”�”}”(hj6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KFhj2ubhÌ)�”}”(hŒ@The flags are (from ``include/uapi/linux/kernel-page-flags.h``):”h]”(hŒThe flags are (from ”…”�”}”(hjRh²hh³Nh´NubhÖ)�”}”(hŒ*``include/uapi/linux/kernel-page-flags.h``”h]”hŒ&include/uapi/linux/kernel-page-flags.h”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjRubhŒ):”…”�”}”(hjRh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KIhj2ubhþ)�”}”(hX40. LOCKED 1. ERROR 2. REFERENCED 3. UPTODATE 4. DIRTY 5. LRU 6. ACTIVE 7. SLAB 8. WRITEBACK 9. RECLAIM 10. BUDDY 11. MMAP 12. ANON 13. SWAPCACHE 14. SWAPBACKED 15. COMPOUND_HEAD 16. COMPOUND_TAIL 17. HUGE 18. UNEVICTABLE 19. HWPOISON 20. NOPAGE 21. KSM 22. THP 23. OFFLINE 24. ZERO_PAGE 25. IDLE 26. PGTABLE ”h]”hŒenumerated_list”“”)�”}”(hhh]”(j )�”}”(hŒLOCKED”h]”hÌ)�”}”(hj}h]”hŒLOCKED”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KKhj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒERROR”h]”hÌ)�”}”(hj”h]”hŒERROR”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ REFERENCED”h]”hÌ)�”}”(hj«h]”hŒ REFERENCED”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KMhj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒUPTODATE”h]”hÌ)�”}”(hjÂh]”hŒUPTODATE”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KNhjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒDIRTY”h]”hÌ)�”}”(hjÙh]”hŒDIRTY”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KOhj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒLRU”h]”hÌ)�”}”(hjðh]”hŒLRU”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KPhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒACTIVE”h]”hÌ)�”}”(hjh]”hŒACTIVE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KQhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒSLAB”h]”hÌ)�”}”(hjh]”hŒSLAB”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KRhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ WRITEBACK”h]”hÌ)�”}”(hj5h]”hŒ WRITEBACK”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KShj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒRECLAIM”h]”hÌ)�”}”(hjLh]”hŒRECLAIM”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KThjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒBUDDY”h]”hÌ)�”}”(hjch]”hŒBUDDY”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KUhjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒMMAP”h]”hÌ)�”}”(hjzh]”hŒMMAP”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KVhjxubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒANON”h]”hÌ)�”}”(hj‘h]”hŒANON”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KWhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ SWAPCACHE”h]”hÌ)�”}”(hj¨h]”hŒ SWAPCACHE”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KXhj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ SWAPBACKED”h]”hÌ)�”}”(hj¿h]”hŒ SWAPBACKED”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KYhj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ COMPOUND_HEAD”h]”hÌ)�”}”(hjÖh]”hŒ COMPOUND_HEAD”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KZhjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ COMPOUND_TAIL”h]”hÌ)�”}”(hjíh]”hŒ COMPOUND_TAIL”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K[hjëubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒHUGE”h]”hÌ)�”}”(hjh]”hŒHUGE”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K\hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ UNEVICTABLE”h]”hÌ)�”}”(hjh]”hŒ UNEVICTABLE”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K]hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒHWPOISON”h]”hÌ)�”}”(hj2h]”hŒHWPOISON”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K^hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒNOPAGE”h]”hÌ)�”}”(hjIh]”hŒNOPAGE”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K_hjGubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒKSM”h]”hÌ)�”}”(hj`h]”hŒKSM”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K`hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒTHP”h]”hÌ)�”}”(hjwh]”hŒTHP”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kahjuubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒOFFLINE”h]”hÌ)�”}”(hjŽh]”hŒOFFLINE”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KbhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒ ZERO_PAGE”h]”hÌ)�”}”(hj¥h]”hŒ ZERO_PAGE”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kchj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒIDLE”h]”hÌ)�”}”(hj¼h]”hŒIDLE”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kdhjºubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubj )�”}”(hŒPGTABLE ”h]”hÌ)�”}”(hŒPGTABLE”h]”hŒPGTABLE”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KehjÑubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjxubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”Œstart”Kuh1jvhjrubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´KKhj2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj/ubj )�”}”(hŒ¨``/proc/kpagecgroup``. This file contains a 64-bit inode number of the memory cgroup each page is charged to, indexed by PFN. Only available when CONFIG_MEMCG is set. ”h]”hÌ)�”}”(hŒ§``/proc/kpagecgroup``. This file contains a 64-bit inode number of the memory cgroup each page is charged to, indexed by PFN. Only available when CONFIG_MEMCG is set.”h]”(hÖ)�”}”(hŒ``/proc/kpagecgroup``”h]”hŒ/proc/kpagecgroup”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ’. This file contains a 64-bit inode number of the memory cgroup each page is charged to, indexed by PFN. Only available when CONFIG_MEMCG is set.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kghjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj/ubeh}”(h]”h ]”h"]”h$]”h&]”jmjnuh1jh³hÊh´KFhj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´KFhh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ$Short descriptions to the page flags”h]”hŒ$Short descriptions to the page flags”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj3h²hh³hÊh´KlubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒ[0 - LOCKED The page is being locked for exclusive access, e.g. by undergoing read/write IO.”h]”(hŒterm”“”)�”}”(hŒ 0 - LOCKED”h]”hŒ 0 - LOCKED”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KohjKubhŒ definition”“”)�”}”(hhh]”hÌ)�”}”(hŒPThe page is being locked for exclusive access, e.g. by undergoing read/write IO.”h]”hŒPThe page is being locked for exclusive access, e.g. by undergoing read/write IO.”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kohjaubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjKubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KohjFubjJ)�”}”(hŒ“7 - SLAB The page is managed by the SLAB/SLUB kernel memory allocator. When compound page is used, either will only set this flag on the head page.”h]”(jP)�”}”(hŒ7 - SLAB”h]”hŒ7 - SLAB”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´Kshj~ubj`)�”}”(hhh]”hÌ)�”}”(hŒŠThe page is managed by the SLAB/SLUB kernel memory allocator. When compound page is used, either will only set this flag on the head page.”h]”hŒŠThe page is managed by the SLAB/SLUB kernel memory allocator. When compound page is used, either will only set this flag on the head page.”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KshjFh²hubjJ)�”}”(hX$10 - BUDDY A free memory block managed by the buddy system allocator. The buddy system organizes free memory in blocks of various orders. An order N block has 2^N physically contiguous pages, with the BUDDY flag set for all pages. Before 4.6 only the first page of the block had the flag set.”h]”(jP)�”}”(hŒ 10 - BUDDY”h]”hŒ 10 - BUDDY”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´Kyhj­ubj`)�”}”(hhh]”hÌ)�”}”(hXA free memory block managed by the buddy system allocator. The buddy system organizes free memory in blocks of various orders. An order N block has 2^N physically contiguous pages, with the BUDDY flag set for all pages. Before 4.6 only the first page of the block had the flag set.”h]”hXA free memory block managed by the buddy system allocator. The buddy system organizes free memory in blocks of various orders. An order N block has 2^N physically contiguous pages, with the BUDDY flag set for all pages. Before 4.6 only the first page of the block had the flag set.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kvhj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KyhjFh²hubjJ)�”}”(hXÆ15 - COMPOUND_HEAD A compound page with order N consists of 2^N physically contiguous pages. A compound page with order 2 takes the form of "HTTT", where H donates its head page and T donates its tail page(s). The major consumers of compound pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst), the SLUB etc. memory allocators and various device drivers. However in this interface, only huge/giga pages are made visible to end users.”h]”(jP)�”}”(hŒ15 - COMPOUND_HEAD”h]”hŒ15 - COMPOUND_HEAD”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K�hjÜubj`)�”}”(hhh]”hÌ)�”}”(hX³A compound page with order N consists of 2^N physically contiguous pages. A compound page with order 2 takes the form of "HTTT", where H donates its head page and T donates its tail page(s). The major consumers of compound pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst), the SLUB etc. memory allocators and various device drivers. However in this interface, only huge/giga pages are made visible to end users.”h]”hX·A compound page with order N consists of 2^N physically contiguous pages. A compound page with order 2 takes the form of “HTTTâ€�, where H donates its head page and T donates its tail page(s). The major consumers of compound pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst), the SLUB etc. memory allocators and various device drivers. However in this interface, only huge/giga pages are made visible to end users.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hjîubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjÜubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K�hjFh²hubjJ)�”}”(hŒ@16 - COMPOUND_TAIL A compound page tail (see description above).”h]”(jP)�”}”(hŒ16 - COMPOUND_TAIL”h]”hŒ16 - COMPOUND_TAIL”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´Kƒhj ubj`)�”}”(hhh]”hÌ)�”}”(hŒ-A compound page tail (see description above).”h]”hŒ-A compound page tail (see description above).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K„hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KƒhjFh²hubjJ)�”}”(hŒ517 - HUGE This is an integral part of a HugeTLB page.”h]”(jP)�”}”(hŒ 17 - HUGE”h]”hŒ 17 - HUGE”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K…hj:ubj`)�”}”(hhh]”hÌ)�”}”(hŒ+This is an integral part of a HugeTLB page.”h]”hŒ+This is an integral part of a HugeTLB page.”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K†hjLubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K…hjFh²hubjJ)�”}”(hŒU19 - HWPOISON Hardware detected memory corruption on this page: don't touch the data!”h]”(jP)�”}”(hŒ 19 - HWPOISON”h]”hŒ 19 - HWPOISON”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K‡hjiubj`)�”}”(hhh]”hÌ)�”}”(hŒGHardware detected memory corruption on this page: don't touch the data!”h]”hŒIHardware detected memory corruption on this page: don’t touch the data!”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kˆhj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjiubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K‡hjFh²hubjJ)�”}”(hŒ:20 - NOPAGE No page frame exists at the requested address.”h]”(jP)�”}”(hŒ 20 - NOPAGE”h]”hŒ 20 - NOPAGE”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K‰hj˜ubj`)�”}”(hhh]”hÌ)�”}”(hŒ.No page frame exists at the requested address.”h]”hŒ.No page frame exists at the requested address.”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŠhjªubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj˜ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K‰hjFh²hubjJ)�”}”(hŒQ21 - KSM Identical memory pages dynamically shared between one or more processes.”h]”(jP)�”}”(hŒ21 - KSM”h]”hŒ21 - KSM”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K‹hjÇubj`)�”}”(hhh]”hÌ)�”}”(hŒHIdentical memory pages dynamically shared between one or more processes.”h]”hŒHIdentical memory pages dynamically shared between one or more processes.”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŒhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjÇubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K‹hjFh²hubjJ)�”}”(hŒX22 - THP Contiguous pages which construct THP of any size and mapped by any granularity.”h]”(jP)�”}”(hŒ22 - THP”h]”hŒ22 - THP”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K�hjöubj`)�”}”(hhh]”hÌ)�”}”(hŒOContiguous pages which construct THP of any size and mapped by any granularity.”h]”hŒOContiguous pages which construct THP of any size and mapped by any granularity.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŽhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjöubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K�hjFh²hubjJ)�”}”(hŒ+23 - OFFLINE The page is logically offline.”h]”(jP)�”}”(hŒ 23 - OFFLINE”h]”hŒ 23 - OFFLINE”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K�hj%ubj`)�”}”(hhh]”hÌ)�”}”(hŒThe page is logically offline.”h]”hŒThe page is logically offline.”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hj7ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj%ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K�hjFh²hubjJ)�”}”(hŒ824 - ZERO_PAGE Zero page for pfn_zero or huge_zero page.”h]”(jP)�”}”(hŒ24 - ZERO_PAGE”h]”hŒ24 - ZERO_PAGE”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K‘hjTubj`)�”}”(hhh]”hÌ)�”}”(hŒ)Zero page for pfn_zero or huge_zero page.”h]”hŒ)Zero page for pfn_zero or huge_zero page.”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K’hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjTubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K‘hjFh²hubjJ)�”}”(hX%25 - IDLE The page has not been accessed since it was marked idle (see Documentation/admin-guide/mm/idle_page_tracking.rst). Note that this flag may be stale in case the page was accessed via a PTE. To make sure the flag is up-to-date one has to read ``/sys/kernel/mm/page_idle/bitmap`` first.”h]”(jP)�”}”(hŒ 25 - IDLE”h]”hŒ 25 - IDLE”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K—hjƒubj`)�”}”(hhh]”hÌ)�”}”(hXThe page has not been accessed since it was marked idle (see Documentation/admin-guide/mm/idle_page_tracking.rst). Note that this flag may be stale in case the page was accessed via a PTE. To make sure the flag is up-to-date one has to read ``/sys/kernel/mm/page_idle/bitmap`` first.”h]”(hŒñThe page has not been accessed since it was marked idle (see Documentation/admin-guide/mm/idle_page_tracking.rst). Note that this flag may be stale in case the page was accessed via a PTE. To make sure the flag is up-to-date one has to read ”…”�”}”(hj˜h²hh³Nh´NubhÖ)�”}”(hŒ#``/sys/kernel/mm/page_idle/bitmap``”h]”hŒ/sys/kernel/mm/page_idle/bitmap”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj˜ubhŒ first.”…”�”}”(hj˜h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K”hj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjƒubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K—hjFh²hubjJ)�”}”(hŒ126 - PGTABLE The page is in use as a page table. ”h]”(jP)�”}”(hŒ 26 - PGTABLE”h]”hŒ 26 - PGTABLE”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KšhjÄubj`)�”}”(hhh]”hÌ)�”}”(hŒ#The page is in use as a page table.”h]”hŒ#The page is in use as a page table.”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KšhjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjÄubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KšhjFh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jDhj3h²hh³hÊh´Nubh¶)�”}”(hhh]”(h»)�”}”(hŒIO related page flags”h]”hŒIO related page flags”…”�”}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjùh²hh³hÊh´K�ubjE)�”}”(hhh]”(jJ)�”}”(hŒ1 - ERROR IO error occurred.”h]”(jP)�”}”(hŒ 1 - ERROR”h]”hŒ 1 - ERROR”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KŸhj ubj`)�”}”(hhh]”hÌ)�”}”(hŒIO error occurred.”h]”hŒIO error occurred.”…”�”}”(hj" h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KŸhj ubjJ)�”}”(hŒm3 - UPTODATE The page has up-to-date data. ie. for file backed page: (in-memory data revision >= on-disk one)”h]”(jP)�”}”(hŒ 3 - UPTODATE”h]”hŒ 3 - UPTODATE”…”�”}”(hj@ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¢hj< ubj`)�”}”(hhh]”hÌ)�”}”(hŒ`The page has up-to-date data. ie. for file backed page: (in-memory data revision >= on-disk one)”h]”hŒ`The page has up-to-date data. ie. for file backed page: (in-memory data revision >= on-disk one)”…”�”}”(hjQ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¢hjN ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj< ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¢hj h²hubjJ)�”}”(hŒ„4 - DIRTY The page has been written to, hence contains new data. i.e. for file backed page: (in-memory data revision > on-disk one)”h]”(jP)�”}”(hŒ 4 - DIRTY”h]”hŒ 4 - DIRTY”…”�”}”(hjo h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¥hjk ubj`)�”}”(hhh]”hÌ)�”}”(hŒzThe page has been written to, hence contains new data. i.e. for file backed page: (in-memory data revision > on-disk one)”h]”hŒzThe page has been written to, hence contains new data. i.e. for file backed page: (in-memory data revision > on-disk one)”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hj} ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjk ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¥hj h²hubjJ)�”}”(hŒ08 - WRITEBACK The page is being synced to disk. ”h]”(jP)�”}”(hŒ 8 - WRITEBACK”h]”hŒ 8 - WRITEBACK”…”�”}”(hjž h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¨hjš ubj`)�”}”(hhh]”hÌ)�”}”(hŒ!The page is being synced to disk.”h]”hŒ!The page is being synced to disk.”…”�”}”(hj¯ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¨hj¬ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjš ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¨hj h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jDhjùh²hh³hÊh´Nubeh}”(h]”Œio-related-page-flags”ah ]”h"]”Œio related page flags”ah$]”h&]”uh1hµhj3h²hh³hÊh´K�ubh¶)�”}”(hhh]”(h»)�”}”(hŒLRU related page flags”h]”hŒLRU related page flags”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj× h²hh³hÊh´K«ubjE)�”}”(hhh]”(jJ)�”}”(hŒ,5 - LRU The page is in one of the LRU lists.”h]”(jP)�”}”(hŒ5 - LRU”h]”hŒ5 - LRU”…”�”}”(hjï h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K­hjë ubj`)�”}”(hhh]”hÌ)�”}”(hŒ$The page is in one of the LRU lists.”h]”hŒ$The page is in one of the LRU lists.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K®hjý ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjë ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K­hjè ubjJ)�”}”(hŒ.6 - ACTIVE The page is in the active LRU list.”h]”(jP)�”}”(hŒ 6 - ACTIVE”h]”hŒ 6 - ACTIVE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¯hj ubj`)�”}”(hhh]”hÌ)�”}”(hŒ#The page is in the active LRU list.”h]”hŒ#The page is in the active LRU list.”…”�”}”(hj/ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K°hj, ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¯hjè h²hubjJ)�”}”(hŒ¾18 - UNEVICTABLE The page is in the unevictable (non-)LRU list It is somehow pinned and not a candidate for LRU page reclaims, e.g. ramfs pages, shmctl(SHM_LOCK) and mlock() memory segments.”h]”(jP)�”}”(hŒ18 - UNEVICTABLE”h]”hŒ18 - UNEVICTABLE”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K³hjI ubj`)�”}”(hhh]”hÌ)�”}”(hŒ­The page is in the unevictable (non-)LRU list It is somehow pinned and not a candidate for LRU page reclaims, e.g. ramfs pages, shmctl(SHM_LOCK) and mlock() memory segments.”h]”hŒ­The page is in the unevictable (non-)LRU list It is somehow pinned and not a candidate for LRU page reclaims, e.g. ramfs pages, shmctl(SHM_LOCK) and mlock() memory segments.”…”�”}”(hj^ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K²hj[ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjI ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K³hjè h²hubjJ)�”}”(hŒP2 - REFERENCED The page has been referenced since last LRU list enqueue/requeue.”h]”(jP)�”}”(hŒ2 - REFERENCED”h]”hŒ2 - REFERENCED”…”�”}”(hj| h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´Kµhjx ubj`)�”}”(hhh]”hÌ)�”}”(hŒAThe page has been referenced since last LRU list enqueue/requeue.”h]”hŒAThe page has been referenced since last LRU list enqueue/requeue.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¶hjŠ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjx ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´Kµhjè h²hubjJ)�”}”(hŒK9 - RECLAIM The page will be reclaimed soon after its pageout IO completed.”h]”(jP)�”}”(hŒ 9 - RECLAIM”h]”hŒ 9 - RECLAIM”…”�”}”(hj« h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K·hj§ ubj`)�”}”(hhh]”hÌ)�”}”(hŒ?The page will be reclaimed soon after its pageout IO completed.”h]”hŒ?The page will be reclaimed soon after its pageout IO completed.”…”�”}”(hj¼ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¸hj¹ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj§ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K·hjè h²hubjJ)�”}”(hŒ11 - MMAP A memory mapped page.”h]”(jP)�”}”(hŒ 11 - MMAP”h]”hŒ 11 - MMAP”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K¹hjÖ ubj`)�”}”(hhh]”hÌ)�”}”(hŒA memory mapped page.”h]”hŒA memory mapped page.”…”�”}”(hjë h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kºhjè ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjÖ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K¹hjè h²hubjJ)�”}”(hŒ:12 - ANON A memory mapped page that is not part of a file.”h]”(jP)�”}”(hŒ 12 - ANON”h]”hŒ 12 - ANON”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K»hj ubj`)�”}”(hhh]”hÌ)�”}”(hŒ0A memory mapped page that is not part of a file.”h]”hŒ0A memory mapped page that is not part of a file.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¼hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K»hjè h²hubjJ)�”}”(hŒS13 - SWAPCACHE The page is mapped to swap space, i.e. has an associated swap entry.”h]”(jP)�”}”(hŒ13 - SWAPCACHE”h]”hŒ13 - SWAPCACHE”…”�”}”(hj8 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´K½hj4 ubj`)�”}”(hhh]”hÌ)�”}”(hŒDThe page is mapped to swap space, i.e. has an associated swap entry.”h]”hŒDThe page is mapped to swap space, i.e. has an associated swap entry.”…”�”}”(hjI h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¾hjF ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hj4 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´K½hjè h²hubjJ)�”}”(hŒ014 - SWAPBACKED The page is backed by swap/RAM. ”h]”(jP)�”}”(hŒ14 - SWAPBACKED”h]”hŒ14 - SWAPBACKED”…”�”}”(hjg h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jOh³hÊh´KÀhjc ubj`)�”}”(hhh]”hÌ)�”}”(hŒThe page is backed by swap/RAM.”h]”hŒThe page is backed by swap/RAM.”…”�”}”(hjx h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÀhju ubah}”(h]”h ]”h"]”h$]”h&]”uh1j_hjc ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jIh³hÊh´KÀhjè h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jDhj× h²hh³hÊh´NubhÌ)�”}”(hŒSThe page-types tool in the tools/mm directory can be used to query the above flags.”h]”hŒSThe page-types tool in the tools/mm directory can be used to query the above flags.”…”�”}”(hj˜ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÂhj× h²hubeh}”(h]”Œlru-related-page-flags”ah ]”h"]”Œlru related page flags”ah$]”h&]”uh1hµhj3h²hh³hÊh´K«ubeh}”(h]”Œ$short-descriptions-to-the-page-flags”ah ]”h"]”Œ$short descriptions to the page flags”ah$]”h&]”uh1hµhh·h²hh³hÊh´Klubh¶)�”}”(hhh]”(h»)�”}”(hŒExceptions for Shared Memory”h]”hŒExceptions for Shared Memory”…”�”}”(hj¹ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¶ h²hh³hÊh´KÆubhÌ)�”}”(hŒ£Page table entries for shared pages are cleared when the pages are zapped or swapped out. This makes swapped out pages indistinguishable from never-allocated ones.”h]”hŒ£Page table entries for shared pages are cleared when the pages are zapped or swapped out. This makes swapped out pages indistinguishable from never-allocated ones.”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÈhj¶ h²hubhÌ)�”}”(hŒÃIn kernel space, the swap location can still be retrieved from the page cache. However, values stored only on the normal PTE get lost irretrievably when the page is swapped out (i.e. SOFT_DIRTY).”h]”hŒÃIn kernel space, the swap location can still be retrieved from the page cache. However, values stored only on the normal PTE get lost irretrievably when the page is swapped out (i.e. SOFT_DIRTY).”…”�”}”(hjÕ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÌhj¶ h²hubhÌ)�”}”(hŒ~In user space, whether the page is present, swapped or none can be deduced with the help of lseek and/or mincore system calls.”h]”hŒ~In user space, whether the page is present, swapped or none can be deduced with the help of lseek and/or mincore system calls.”…”�”}”(hjã h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÐhj¶ h²hubhÌ)�”}”(hXlseek() can differentiate between accessed pages (present or swapped out) and holes (none/non-allocated) by specifying the SEEK_DATA flag on the file where the pages are backed. For anonymous shared pages, the file can be found in ``/proc/pid/map_files/``.”h]”(hŒçlseek() can differentiate between accessed pages (present or swapped out) and holes (none/non-allocated) by specifying the SEEK_DATA flag on the file where the pages are backed. For anonymous shared pages, the file can be found in ”…”�”}”(hjñ h²hh³Nh´NubhÖ)�”}”(hŒ``/proc/pid/map_files/``”h]”hŒ/proc/pid/map_files/”…”�”}”(hjù h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjñ ubhŒ.”…”�”}”(hjñ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÓhj¶ h²hubhÌ)�”}”(hŒŠmincore() can differentiate between pages in memory (present, including swap cache) and out of memory (swapped out or none/non-allocated).”h]”hŒŠmincore() can differentiate between pages in memory (present, including swap cache) and out of memory (swapped out or none/non-allocated).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KØhj¶ h²hubeh}”(h]”Œexceptions-for-shared-memory”ah ]”h"]”Œexceptions for shared memory”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÆubh¶)�”}”(hhh]”(h»)�”}”(hŒ Other notes”h]”hŒ Other notes”…”�”}”(hj* h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj' h²hh³hÊh´KÜubhÌ)�”}”(hŒÝReading from any of the files will return -EINVAL if you are not starting the read on an 8-byte boundary (e.g., if you sought an odd number of bytes into the file), or if the size of the read is not a multiple of 8 bytes.”h]”hŒÝReading from any of the files will return -EINVAL if you are not starting the read on an 8-byte boundary (e.g., if you sought an odd number of bytes into the file), or if the size of the read is not a multiple of 8 bytes.”…”�”}”(hj8 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÞhj' h²hubhÌ)�”}”(hŒñBefore Linux 3.11 pagemap bits 55-60 were used for "page-shift" (which is always 12 at most architectures). Since Linux 3.11 their meaning changes after first clear of soft-dirty bits. Since Linux 4.2 they are used for flags unconditionally.”h]”hŒõBefore Linux 3.11 pagemap bits 55-60 were used for “page-shiftâ€� (which is always 12 at most architectures). Since Linux 3.11 their meaning changes after first clear of soft-dirty bits. Since Linux 4.2 they are used for flags unconditionally.”…”�”}”(hjF h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kâhj' h²hubeh}”(h]”Œ other-notes”ah ]”h"]”Œ other notes”ah$]”h&]”uh1hµhh·h²hh³hÊh´KÜubh¶)�”}”(hhh]”(h»)�”}”(hŒPagemap Scan IOCTL”h]”hŒPagemap Scan IOCTL”…”�”}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj\ h²hh³hÊh´KèubhÌ)�”}”(hŒ®The ``PAGEMAP_SCAN`` IOCTL on the pagemap file can be used to get or optionally clear the info about page table entries. The following operations are supported in this IOCTL:”h]”(hŒThe ”…”�”}”(hjm h²hh³Nh´NubhÖ)�”}”(hŒ``PAGEMAP_SCAN``”h]”hŒ PAGEMAP_SCAN”…”�”}”(hju h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjm ubhŒš IOCTL on the pagemap file can be used to get or optionally clear the info about page table entries. The following operations are supported in this IOCTL:”…”�”}”(hjm h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kêhj\ h²hubj)�”}”(hhh]”(j )�”}”(hŒ‡Scan the address range and get the memory ranges matching the provided criteria. This is performed when the output buffer is specified.”h]”hÌ)�”}”(hŒ‡Scan the address range and get the memory ranges matching the provided criteria. This is performed when the output buffer is specified.”h]”hŒ‡Scan the address range and get the memory ranges matching the provided criteria. This is performed when the output buffer is specified.”…”�”}”(hj” h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kîhj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj� h²hh³hÊh´Nubj )�”}”(hXWrite-protect the pages. The ``PM_SCAN_WP_MATCHING`` is used to write-protect the pages of interest. The ``PM_SCAN_CHECK_WPASYNC`` aborts the operation if non-Async Write Protected pages are found. The ``PM_SCAN_WP_MATCHING`` can be used with or without ``PM_SCAN_CHECK_WPASYNC``.”h]”hÌ)�”}”(hXWrite-protect the pages. The ``PM_SCAN_WP_MATCHING`` is used to write-protect the pages of interest. The ``PM_SCAN_CHECK_WPASYNC`` aborts the operation if non-Async Write Protected pages are found. The ``PM_SCAN_WP_MATCHING`` can be used with or without ``PM_SCAN_CHECK_WPASYNC``.”h]”(hŒWrite-protect the pages. The ”…”�”}”(hj¬ h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_WP_MATCHING``”h]”hŒPM_SCAN_WP_MATCHING”…”�”}”(hj´ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj¬ ubhŒ5 is used to write-protect the pages of interest. The ”…”�”}”(hj¬ h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_CHECK_WPASYNC``”h]”hŒPM_SCAN_CHECK_WPASYNC”…”�”}”(hjÆ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj¬ ubhŒH aborts the operation if non-Async Write Protected pages are found. The ”…”�”}”(hj¬ h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_WP_MATCHING``”h]”hŒPM_SCAN_WP_MATCHING”…”�”}”(hjØ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj¬ ubhŒ can be used with or without ”…”�”}”(hj¬ h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_CHECK_WPASYNC``”h]”hŒPM_SCAN_CHECK_WPASYNC”…”�”}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj¬ ubhŒ.”…”�”}”(hj¬ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kðhj¨ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj� h²hh³hÊh´Nubj )�”}”(hŒyBoth of those operations can be combined into one atomic operation where we can get and write protect the pages as well. ”h]”hÌ)�”}”(hŒxBoth of those operations can be combined into one atomic operation where we can get and write protect the pages as well.”h]”hŒxBoth of those operations can be combined into one atomic operation where we can get and write protect the pages as well.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kôhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj� h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jmŒ-”uh1jh³hÊh´Kîhj\ h²hubhÌ)�”}”(hŒ4Following flags about pages are currently supported:”h]”hŒ4Following flags about pages are currently supported:”…”�”}”(hj' h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K÷hj\ h²hubj)�”}”(hhh]”(j )�”}”(hŒ?``PAGE_IS_WPALLOWED`` - Page has async-write-protection enabled”h]”hÌ)�”}”(hj: h]”(hÖ)�”}”(hŒ``PAGE_IS_WPALLOWED``”h]”hŒPAGE_IS_WPALLOWED”…”�”}”(hj? h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj< ubhŒ* - Page has async-write-protection enabled”…”�”}”(hj< h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kùhj8 ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ‘``PAGE_IS_WRITTEN`` - Page in a ``UFFDIO_REGISTER_MODE_WP`` VMA has been written to since it was write-protected. Only reported inside such VMAs.”h]”hÌ)�”}”(hŒ‘``PAGE_IS_WRITTEN`` - Page in a ``UFFDIO_REGISTER_MODE_WP`` VMA has been written to since it was write-protected. Only reported inside such VMAs.”h]”(hÖ)�”}”(hŒ``PAGE_IS_WRITTEN``”h]”hŒPAGE_IS_WRITTEN”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhja ubhŒ - Page in a ”…”�”}”(hja h²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_REGISTER_MODE_WP``”h]”hŒUFFDIO_REGISTER_MODE_WP”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhja ubhŒV VMA has been written to since it was write-protected. Only reported inside such VMAs.”…”�”}”(hja h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kúhj] ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ&``PAGE_IS_FILE`` - Page is file backed”h]”hÌ)�”}”(hj— h]”(hÖ)�”}”(hŒ``PAGE_IS_FILE``”h]”hŒ PAGE_IS_FILE”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj™ ubhŒ - Page is file backed”…”�”}”(hj™ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kühj• ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ3``PAGE_IS_PRESENT`` - Page is present in the memory”h]”hÌ)�”}”(hj¼ h]”(hÖ)�”}”(hŒ``PAGE_IS_PRESENT``”h]”hŒPAGE_IS_PRESENT”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj¾ ubhŒ - Page is present in the memory”…”�”}”(hj¾ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kýhjº ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ(``PAGE_IS_SWAPPED`` - Page is in swapped”h]”hÌ)�”}”(hjá h]”(hÖ)�”}”(hŒ``PAGE_IS_SWAPPED``”h]”hŒPAGE_IS_SWAPPED”…”�”}”(hjæ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjã ubhŒ - Page is in swapped”…”�”}”(hjã h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kþhjß ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ'``PAGE_IS_PFNZERO`` - Page has zero PFN”h]”hÌ)�”}”(hjh]”(hÖ)�”}”(hŒ``PAGE_IS_PFNZERO``”h]”hŒPAGE_IS_PFNZERO”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ - Page has zero PFN”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kÿhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ;``PAGE_IS_HUGE`` - Page is PMD-mapped THP or Hugetlb backed”h]”hÌ)�”}”(hj+h]”(hÖ)�”}”(hŒ``PAGE_IS_HUGE``”h]”hŒ PAGE_IS_HUGE”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj-ubhŒ+ - Page is PMD-mapped THP or Hugetlb backed”…”�”}”(hj-h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ+``PAGE_IS_SOFT_DIRTY`` - Page is soft-dirty”h]”hÌ)�”}”(hjPh]”(hÖ)�”}”(hŒ``PAGE_IS_SOFT_DIRTY``”h]”hŒPAGE_IS_SOFT_DIRTY”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjRubhŒ - Page is soft-dirty”…”�”}”(hjRh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒ4``PAGE_IS_GUARD`` - Page is a part of a guard region”h]”hÌ)�”}”(hjuh]”(hÖ)�”}”(hŒ``PAGE_IS_GUARD``”h]”hŒ PAGE_IS_GUARD”…”�”}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjwubhŒ# - Page is a part of a guard region”…”�”}”(hjwh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjsubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubj )�”}”(hŒÒ``PAGE_IS_ACCESSED`` - Page in a ``UFFDIO_REGISTER_MODE_RWP`` VMA has been accessed since RWP was applied. Only reported inside such VMAs. See Documentation/admin-guide/mm/userfaultfd.rst for the RWP workflow. ”h]”hÌ)�”}”(hŒÑ``PAGE_IS_ACCESSED`` - Page in a ``UFFDIO_REGISTER_MODE_RWP`` VMA has been accessed since RWP was applied. Only reported inside such VMAs. See Documentation/admin-guide/mm/userfaultfd.rst for the RWP workflow.”h]”(hÖ)�”}”(hŒ``PAGE_IS_ACCESSED``”h]”hŒPAGE_IS_ACCESSED”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjœubhŒ - Page in a ”…”�”}”(hjœh²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_REGISTER_MODE_RWP``”h]”hŒUFFDIO_REGISTER_MODE_RWP”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjœubhŒ” VMA has been accessed since RWP was applied. Only reported inside such VMAs. See Documentation/admin-guide/mm/userfaultfd.rst for the RWP workflow.”…”�”}”(hjœh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj5 h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jmj& uh1jh³hÊh´Kùhj\ h²hubhÌ)�”}”(hŒ@The ``struct pm_scan_arg`` is used as the argument of the IOCTL.”h]”(hŒThe ”…”�”}”(hjÖh²hh³Nh´NubhÖ)�”}”(hŒ``struct pm_scan_arg``”h]”hŒstruct pm_scan_arg”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjÖubhŒ& is used as the argument of the IOCTL.”…”�”}”(hjÖh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj\ h²hubhþ)�”}”(hX´1. The size of the ``struct pm_scan_arg`` must be specified in the ``size`` field. This field will be helpful in recognizing the structure if extensions are done later. 2. The flags can be specified in the ``flags`` field. The ``PM_SCAN_WP_MATCHING`` and ``PM_SCAN_CHECK_WPASYNC`` are the only added flags at this time. The get operation is optionally performed depending upon if the output buffer is provided or not. 3. The range is specified through ``start`` and ``end``. 4. The walk can abort before visiting the complete range such as the user buffer can get full etc. The walk ending address is specified in ``walk_end``. 5. The output buffer of ``struct page_region`` array and size is specified in ``vec`` and ``vec_len``. 6. The optional maximum requested pages are specified in the ``max_pages``. 7. The masks are specified in ``category_mask``, ``category_anyof_mask``, ``category_inverted`` and ``return_mask``. ”h]”jw)�”}”(hhh]”(j )�”}”(hŒ¥The size of the ``struct pm_scan_arg`` must be specified in the ``size`` field. This field will be helpful in recognizing the structure if extensions are done later.”h]”hÌ)�”}”(hŒ¥The size of the ``struct pm_scan_arg`` must be specified in the ``size`` field. This field will be helpful in recognizing the structure if extensions are done later.”h]”(hŒThe size of the ”…”�”}”(hjh²hh³Nh´NubhÖ)�”}”(hŒ``struct pm_scan_arg``”h]”hŒstruct pm_scan_arg”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ must be specified in the ”…”�”}”(hjh²hh³Nh´NubhÖ)�”}”(hŒ``size``”h]”hŒsize”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjubhŒ] field. This field will be helpful in recognizing the structure if extensions are done later.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjýubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒõThe flags can be specified in the ``flags`` field. The ``PM_SCAN_WP_MATCHING`` and ``PM_SCAN_CHECK_WPASYNC`` are the only added flags at this time. The get operation is optionally performed depending upon if the output buffer is provided or not.”h]”hÌ)�”}”(hŒõThe flags can be specified in the ``flags`` field. The ``PM_SCAN_WP_MATCHING`` and ``PM_SCAN_CHECK_WPASYNC`` are the only added flags at this time. The get operation is optionally performed depending upon if the output buffer is provided or not.”h]”(hŒ"The flags can be specified in the ”…”�”}”(hj=h²hh³Nh´NubhÖ)�”}”(hŒ ``flags``”h]”hŒflags”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj=ubhŒ field. The ”…”�”}”(hj=h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_WP_MATCHING``”h]”hŒPM_SCAN_WP_MATCHING”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj=ubhŒ and ”…”�”}”(hj=h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_CHECK_WPASYNC``”h]”hŒPM_SCAN_CHECK_WPASYNC”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj=ubhŒ‰ are the only added flags at this time. The get operation is optionally performed depending upon if the output buffer is provided or not.”…”�”}”(hj=h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hj9ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒ5The range is specified through ``start`` and ``end``.”h]”hÌ)�”}”(hj‰h]”(hŒThe range is specified through ”…”�”}”(hj‹h²hh³Nh´NubhÖ)�”}”(hŒ ``start``”h]”hŒstart”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj‹ubhŒ and ”…”�”}”(hj‹h²hh³Nh´NubhÖ)�”}”(hŒ``end``”h]”hŒend”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj‹ubhŒ.”…”�”}”(hj‹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒ•The walk can abort before visiting the complete range such as the user buffer can get full etc. The walk ending address is specified in ``walk_end``.”h]”hÌ)�”}”(hŒ•The walk can abort before visiting the complete range such as the user buffer can get full etc. The walk ending address is specified in ``walk_end``.”h]”(hŒˆThe walk can abort before visiting the complete range such as the user buffer can get full etc. The walk ending address is specified in ”…”�”}”(hjÆh²hh³Nh´NubhÖ)�”}”(hŒ ``walk_end``”h]”hŒwalk_end”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjÆubhŒ.”…”�”}”(hjÆh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒcThe output buffer of ``struct page_region`` array and size is specified in ``vec`` and ``vec_len``.”h]”hÌ)�”}”(hŒcThe output buffer of ``struct page_region`` array and size is specified in ``vec`` and ``vec_len``.”h]”(hŒThe output buffer of ”…”�”}”(hjðh²hh³Nh´NubhÖ)�”}”(hŒ``struct page_region``”h]”hŒstruct page_region”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjðubhŒ array and size is specified in ”…”�”}”(hjðh²hh³Nh´NubhÖ)�”}”(hŒ``vec``”h]”hŒvec”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjðubhŒ and ”…”�”}”(hjðh²hh³Nh´NubhÖ)�”}”(hŒ ``vec_len``”h]”hŒvec_len”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjðubhŒ.”…”�”}”(hjðh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒHThe optional maximum requested pages are specified in the ``max_pages``.”h]”hÌ)�”}”(hj<h]”(hŒ:The optional maximum requested pages are specified in the ”…”�”•÷/}”(hj>h²hh³Nh´NubhÖ)�”}”(hŒ ``max_pages``”h]”hŒ max_pages”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj>ubhŒ.”…”�”}”(hj>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubj )�”}”(hŒrThe masks are specified in ``category_mask``, ``category_anyof_mask``, ``category_inverted`` and ``return_mask``. ”h]”hÌ)�”}”(hŒqThe masks are specified in ``category_mask``, ``category_anyof_mask``, ``category_inverted`` and ``return_mask``.”h]”(hŒThe masks are specified in ”…”�”}”(hjgh²hh³Nh´NubhÖ)�”}”(hŒ``category_mask``”h]”hŒ category_mask”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjgubhŒ, ”…”�”}”(hjgh²hh³Nh´NubhÖ)�”}”(hŒ``category_anyof_mask``”h]”hŒcategory_anyof_mask”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjgubhŒ, ”…”�”}”(hjgh²hh³Nh´NubhÖ)�”}”(hŒ``category_inverted``”h]”hŒcategory_inverted”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjgubhŒ and ”…”�”}”(hjgh²hh³Nh´NubhÖ)�”}”(hŒ``return_mask``”h]”hŒ return_mask”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjgubhŒ.”…”�”}”(hjgh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjcubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjúubeh}”(h]”h ]”h"]”h$]”h&]”jïjðjñhjòjóuh1jvhjöubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´M hj\ h²hubhÌ)�”}”(hŒ8Find pages which have been written and WP them as well::”h]”hŒ7Find pages which have been written and WP them as well:”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj\ h²hubhŒ literal_block”“”)�”}”(hŒ­struct pm_scan_arg arg = { .size = sizeof(arg), .flags = PM_SCAN_WP_MATCHING | PM_SCAN_CHECK_WPASYNC, .. .category_mask = PAGE_IS_WRITTEN, .return_mask = PAGE_IS_WRITTEN, };”h]”hŒ­struct pm_scan_arg arg = { .size = sizeof(arg), .flags = PM_SCAN_WP_MATCHING | PM_SCAN_CHECK_WPASYNC, .. .category_mask = PAGE_IS_WRITTEN, .return_mask = PAGE_IS_WRITTEN, };”…”�”}”hjßsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jÝh³hÊh´Mhj\ h²hubhÌ)�”}”(hŒ]Find pages which have been written, are file backed, not swapped and either present or huge::”h]”hŒ\Find pages which have been written, are file backed, not swapped and either present or huge:”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M#hj\ h²hubjÞ)�”}”(hX1struct pm_scan_arg arg = { .size = sizeof(arg), .flags = 0, .. .category_mask = PAGE_IS_WRITTEN | PAGE_IS_FILE, .category_inverted = PAGE_IS_SWAPPED, .category_anyof_mask = PAGE_IS_PRESENT | PAGE_IS_HUGE, .return_mask = PAGE_IS_WRITTEN | PAGE_IS_SWAPPED | PAGE_IS_PRESENT | PAGE_IS_HUGE, };”h]”hX1struct pm_scan_arg arg = { .size = sizeof(arg), .flags = 0, .. .category_mask = PAGE_IS_WRITTEN | PAGE_IS_FILE, .category_inverted = PAGE_IS_SWAPPED, .category_anyof_mask = PAGE_IS_PRESENT | PAGE_IS_HUGE, .return_mask = PAGE_IS_WRITTEN | PAGE_IS_SWAPPED | PAGE_IS_PRESENT | PAGE_IS_HUGE, };”…”�”}”hjýsbah}”(h]”h ]”h"]”h$]”h&]”jíjîuh1jÝh³hÊh´M&hj\ h²hubhÌ)�”}”(hX3The ``PAGE_IS_WRITTEN`` flag can be considered as a better-performing alternative of soft-dirty flag. It doesn't get affected by VMA merging of the kernel and hence the user can find the true soft-dirty pages in case of normal pages. (There may still be extra dirty pages reported for THP or Hugetlb pages.)”h]”(hŒThe ”…”�”}”(hj h²hh³Nh´NubhÖ)�”}”(hŒ``PAGE_IS_WRITTEN``”h]”hŒPAGE_IS_WRITTEN”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj ubhX flag can be considered as a better-performing alternative of soft-dirty flag. It doesn’t get affected by VMA merging of the kernel and hence the user can find the true soft-dirty pages in case of normal pages. (There may still be extra dirty pages reported for THP or Hugetlb pages.)”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M1hj\ h²hubhÌ)�”}”(hŒz"PAGE_IS_WRITTEN" category is used with uffd write protect-enabled ranges to implement memory dirty tracking in userspace:”h]”hŒ~“PAGE_IS_WRITTENâ€� category is used with uffd write protect-enabled ranges to implement memory dirty tracking in userspace:”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M6hj\ h²hubhþ)�”}”(hX1. The userfaultfd file descriptor is created with ``userfaultfd`` syscall. 2. The ``UFFD_FEATURE_WP_UNPOPULATED`` and ``UFFD_FEATURE_WP_ASYNC`` features are set by ``UFFDIO_API`` IOCTL. 3. The memory range is registered with ``UFFDIO_REGISTER_MODE_WP`` mode through ``UFFDIO_REGISTER`` IOCTL. 4. Then any part of the registered memory or the whole memory region must be write protected using ``PAGEMAP_SCAN`` IOCTL with flag ``PM_SCAN_WP_MATCHING`` or the ``UFFDIO_WRITEPROTECT`` IOCTL can be used. Both of these perform the same operation. The former is better in terms of performance. 5. Now the ``PAGEMAP_SCAN`` IOCTL can be used to either just find pages which have been written to since they were last marked and/or optionally write protect the pages as well.”h]”jw)�”}”(hhh]”(j )�”}”(hŒHThe userfaultfd file descriptor is created with ``userfaultfd`` syscall.”h]”hÌ)�”}”(hjBh]”(hŒ0The userfaultfd file descriptor is created with ”…”�”}”(hjDh²hh³Nh´NubhÖ)�”}”(hŒ``userfaultfd``”h]”hŒ userfaultfd”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjDubhŒ syscall.”…”�”}”(hjDh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M9hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubj )�”}”(hŒkThe ``UFFD_FEATURE_WP_UNPOPULATED`` and ``UFFD_FEATURE_WP_ASYNC`` features are set by ``UFFDIO_API`` IOCTL.”h]”hÌ)�”}”(hŒkThe ``UFFD_FEATURE_WP_UNPOPULATED`` and ``UFFD_FEATURE_WP_ASYNC`` features are set by ``UFFDIO_API`` IOCTL.”h]”(hŒThe ”…”�”}”(hjmh²hh³Nh´NubhÖ)�”}”(hŒ``UFFD_FEATURE_WP_UNPOPULATED``”h]”hŒUFFD_FEATURE_WP_UNPOPULATED”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjmubhŒ and ”…”�”}”(hjmh²hh³Nh´NubhÖ)�”}”(hŒ``UFFD_FEATURE_WP_ASYNC``”h]”hŒUFFD_FEATURE_WP_ASYNC”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjmubhŒ features are set by ”…”�”}”(hjmh²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_API``”h]”hŒ UFFDIO_API”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjmubhŒ IOCTL.”…”�”}”(hjmh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M:hjiubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubj )�”}”(hŒgThe memory range is registered with ``UFFDIO_REGISTER_MODE_WP`` mode through ``UFFDIO_REGISTER`` IOCTL.”h]”hÌ)�”}”(hŒgThe memory range is registered with ``UFFDIO_REGISTER_MODE_WP`` mode through ``UFFDIO_REGISTER`` IOCTL.”h]”(hŒ$The memory range is registered with ”…”�”}”(hj»h²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_REGISTER_MODE_WP``”h]”hŒUFFDIO_REGISTER_MODE_WP”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj»ubhŒ mode through ”…”�”}”(hj»h²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_REGISTER``”h]”hŒUFFDIO_REGISTER”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj»ubhŒ IOCTL.”…”�”}”(hj»h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M<hj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubj )�”}”(hX"Then any part of the registered memory or the whole memory region must be write protected using ``PAGEMAP_SCAN`` IOCTL with flag ``PM_SCAN_WP_MATCHING`` or the ``UFFDIO_WRITEPROTECT`` IOCTL can be used. Both of these perform the same operation. The former is better in terms of performance.”h]”hÌ)�”}”(hX"Then any part of the registered memory or the whole memory region must be write protected using ``PAGEMAP_SCAN`` IOCTL with flag ``PM_SCAN_WP_MATCHING`` or the ``UFFDIO_WRITEPROTECT`` IOCTL can be used. Both of these perform the same operation. The former is better in terms of performance.”h]”(hŒ`Then any part of the registered memory or the whole memory region must be write protected using ”…”�”}”(hj÷h²hh³Nh´NubhÖ)�”}”(hŒ``PAGEMAP_SCAN``”h]”hŒ PAGEMAP_SCAN”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj÷ubhŒ IOCTL with flag ”…”�”}”(hj÷h²hh³Nh´NubhÖ)�”}”(hŒ``PM_SCAN_WP_MATCHING``”h]”hŒPM_SCAN_WP_MATCHING”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj÷ubhŒ or the ”…”�”}”(hj÷h²hh³Nh´NubhÖ)�”}”(hŒ``UFFDIO_WRITEPROTECT``”h]”hŒUFFDIO_WRITEPROTECT”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhj÷ubhŒk IOCTL can be used. Both of these perform the same operation. The former is better in terms of performance.”…”�”}”(hj÷h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M>hjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubj )�”}”(hŒ®Now the ``PAGEMAP_SCAN`` IOCTL can be used to either just find pages which have been written to since they were last marked and/or optionally write protect the pages as well.”h]”hÌ)�”}”(hŒ®Now the ``PAGEMAP_SCAN`` IOCTL can be used to either just find pages which have been written to since they were last marked and/or optionally write protect the pages as well.”h]”(hŒNow the ”…”�”}”(hjEh²hh³Nh´NubhÖ)�”}”(hŒ``PAGEMAP_SCAN``”h]”hŒ PAGEMAP_SCAN”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÕhjEubhŒ– IOCTL can be used to either just find pages which have been written to since they were last marked and/or optionally write protect the pages as well.”…”�”}”(hjEh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MBhjAubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubeh}”(h]”h ]”h"]”h$]”h&]”jïjðjñhjòjóuh1jvhj9ubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÊh´M9hj\ h²hubeh}”(h]”Œpagemap-scan-ioctl”ah ]”h"]”Œpagemap scan ioctl”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kèubeh}”(h]”Œexamining-process-page-tables”ah ]”h"]”Œexamining process page tables”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jªŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j„j�j³ j° jÔ jÑ j« j¨ j$ j! jY jV j|jyuŒ nametypes”}”(j„‰j³ ‰jÔ ‰j« ‰j$ ‰jY ‰j|‰uh}”(j�h·j° j3jÑ jùj¨ j× j! j¶ jV j' jyj\ uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”hŒsystem_message”“”)�”}”(hhh]”hÌ)�”}”(hŒ:Enumerated list start value not ordinal-1: "0" (ordinal 0)”h]”hŒ>Enumerated list start value not ordinal-1: “0â€� (ordinal 0)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÊŒline”Kuh1j hjrubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.