Lines Matching +full:async +full:- +full:page +full:- +full:mode

2 Examining Process Page Tables
6 userspace programs to examine the page tables and related information by
12 physical frame each virtual page is mapped to. It contains one 64-bit
13 value for each virtual page, containing the following data (from
16 * Bits 0-54 page frame number (PFN) if present
17 * Bits 0-4 swap type if swapped
18 * Bits 5-54 swap offset if swapped
19 * Bit 55 pte is soft-dirty (see
20 Documentation/admin-guide/mm/soft-dirty.rst)
21 * Bit 56 page exclusively mapped (since 4.2)
22 * Bit 57 pte is uffd-wp write-protected (since 5.13) (see
23 Documentation/admin-guide/mm/userfaultfd.rst)
24 * Bit 58 pte is a guard region (since 6.15) (see madvise (2) man page)
25 * Bits 59-60 zero
26 * Bit 61 page is file-page or shared-anon (since 3.5)
27 * Bit 62 page swapped
28 * Bit 63 page present
31 In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from
35 If the page is not present but in swap, then the PFN contains an
36 encoding of the swap file number and the page's offset into the
41 Traditionally, bit 56 indicates that a page is mapped exactly once and bit
42 56 is clear when a page is mapped multiple times, even when mapped in the
46 mapped in the same process, even if the page is mapped multiple times in that
47 process. Bit 56 is clear when any page page of the larger allocation
56 * ``/proc/kpagecount``. This file contains a 64-bit count of the number of
57 times each page is mapped, indexed by PFN. Some kernel configurations do
58 not track the precise number of times a page part of a larger allocation
60 mappings per page in this larger allocation is returned instead. However,
61 if any page of the large allocation is mapped, the returned value will
64 The page-types tool in the tools/mm directory can be used to query the
65 number of times a page is mapped.
67 * ``/proc/kpageflags``. This file contains a 64-bit set of flags for each
68 page, indexed by PFN.
70 The flags are (from ``fs/proc/page.c``, above kpageflags_read):
100 * ``/proc/kpagecgroup``. This file contains a 64-bit inode number of the
101 memory cgroup each page is charged to, indexed by PFN. Only available when
104 Short descriptions to the page flags
107 0 - LOCKED
108 The page is being locked for exclusive access, e.g. by undergoing read/write
110 7 - SLAB
111 The page is managed by the SLAB/SLUB kernel memory allocator.
112 When compound page is used, either will only set this flag on the head
113 page.
114 10 - BUDDY
118 set for and _only_ for the first page.
119 15 - COMPOUND_HEAD
120 A compound page with order N consists of 2^N physically contiguous pages.
121 A compound page with order 2 takes the form of "HTTT", where H donates its
122 head page and T donates its tail page(s). The major consumers of compound
123 pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst),
127 16 - COMPOUND_TAIL
128 A compound page tail (see description above).
129 17 - HUGE
130 This is an integral part of a HugeTLB page.
131 19 - HWPOISON
132 Hardware detected memory corruption on this page: don't touch the data!
133 20 - NOPAGE
134 No page frame exists at the requested address.
135 21 - KSM
137 22 - THP
139 23 - OFFLINE
140 The page is logically offline.
141 24 - ZERO_PAGE
142 Zero page for pfn_zero or huge_zero page.
143 25 - IDLE
144 The page has not been accessed since it was marked idle (see
145 Documentation/admin-guide/mm/idle_page_tracking.rst).
146 Note that this flag may be stale in case the page was accessed via
147 a PTE. To make sure the flag is up-to-date one has to read
149 26 - PGTABLE
150 The page is in use as a page table.
152 IO related page flags
153 ---------------------
155 1 - ERROR
157 3 - UPTODATE
158 The page has up-to-date data.
159 ie. for file backed page: (in-memory data revision >= on-disk one)
160 4 - DIRTY
161 The page has been written to, hence contains new data.
162 i.e. for file backed page: (in-memory data revision > on-disk one)
163 8 - WRITEBACK
164 The page is being synced to disk.
166 LRU related page flags
167 ----------------------
169 5 - LRU
170 The page is in one of the LRU lists.
171 6 - ACTIVE
172 The page is in the active LRU list.
173 18 - UNEVICTABLE
174 The page is in the unevictable (non-)LRU list It is somehow pinned and
175 not a candidate for LRU page reclaims, e.g. ramfs pages,
177 2 - REFERENCED
178 The page has been referenced since last LRU list enqueue/requeue.
179 9 - RECLAIM
180 The page will be reclaimed soon after its pageout IO completed.
181 11 - MMAP
182 A memory mapped page.
183 12 - ANON
184 A memory mapped page that is not part of a file.
185 13 - SWAPCACHE
186 The page is mapped to swap space, i.e. has an associated swap entry.
187 14 - SWAPBACKED
188 The page is backed by swap/RAM.
190 The page-types tool in the tools/mm directory can be used to query the
196 Page table entries for shared pages are cleared when the pages are zapped or
197 swapped out. This makes swapped out pages indistinguishable from never-allocated
200 In kernel space, the swap location can still be retrieved from the page cache.
202 page is swapped out (i.e. SOFT_DIRTY).
204 In user space, whether the page is present, swapped or none can be deduced with
208 holes (none/non-allocated) by specifying the SEEK_DATA flag on the file where
213 cache) and out of memory (swapped out or none/non-allocated).
218 Reading from any of the files will return -EINVAL if you are not starting
219 the read on an 8-byte boundary (e.g., if you sought an odd number of bytes
222 Before Linux 3.11 pagemap bits 55-60 were used for "page-shift" (which is
224 after first clear of soft-dirty bits. Since Linux 4.2 they are used for
231 clear the info about page table entries. The following operations are supported
234 - Scan the address range and get the memory ranges matching the provided criteria.
236 - Write-protect the pages. The ``PM_SCAN_WP_MATCHING`` is used to write-protect
238 non-Async Write Protected pages are found. The ``PM_SCAN_WP_MATCHING`` can be
240 - Both of those operations can be combined into one atomic operation where we can
245 - ``PAGE_IS_WPALLOWED`` - Page has async-write-protection enabled
246 - ``PAGE_IS_WRITTEN`` - Page has been written to from the time it was write protected
247 - ``PAGE_IS_FILE`` - Page is file backed
248 - ``PAGE_IS_PRESENT`` - Page is present in the memory
249 - ``PAGE_IS_SWAPPED`` - Page is in swapped
250 - ``PAGE_IS_PFNZERO`` - Page has zero PFN
251 - ``PAGE_IS_HUGE`` - Page is PMD-mapped THP or Hugetlb backed
252 - ``PAGE_IS_SOFT_DIRTY`` - Page is soft-dirty
253 - ``PAGE_IS_GUARD`` - Page is a part of a guard region
297 The ``PAGE_IS_WRITTEN`` flag can be considered as a better-performing alternative
298 of soft-dirty flag. It doesn't get affected by VMA merging of the kernel and hence
299 the user can find the true soft-dirty pages in case of normal pages. (There may
302 "PAGE_IS_WRITTEN" category is used with uffd write protect-enabled ranges to
308 3. The memory range is registered with ``UFFDIO_REGISTER_MODE_WP`` mode