Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Docs/admin-guide/mm/pagemap: wordsmith page flags descriptions

Some descriptions of page flags in 'pagemap.rst' are written in
assumption of none-rst, which respects every new line, as below:

7 - SLAB
page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator
When compound page is used, SLUB/SLQB will only set this flag on the head

Because rst ignores the new line between the first sentence and second
sentence, resulting html looks a little bit weird, as below.

7 - SLAB
page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator When
^
compound page is used, SLUB/SLQB will only set this flag on the head
page; SLOB will not flag it at all.

This change makes it more natural and consistent with other parts in the
rendered version.

Link: https://lkml.kernel.org/r/20211022090311.3856-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

SeongJae Park and committed by
Linus Torvalds
0d16cfd4 b1eee3c5

+27 -26
+27 -26
Documentation/admin-guide/mm/pagemap.rst
··· 90 90 ==================================== 91 91 92 92 0 - LOCKED 93 - page is being locked for exclusive access, e.g. by undergoing read/write IO 93 + The page is being locked for exclusive access, e.g. by undergoing read/write 94 + IO. 94 95 7 - SLAB 95 - page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator 96 + The page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator. 96 97 When compound page is used, SLUB/SLQB will only set this flag on the head 97 98 page; SLOB will not flag it at all. 98 99 10 - BUDDY 99 - a free memory block managed by the buddy system allocator 100 + A free memory block managed by the buddy system allocator. 100 101 The buddy system organizes free memory in blocks of various orders. 101 102 An order N block has 2^N physically contiguous pages, with the BUDDY flag 102 103 set for and _only_ for the first page. ··· 113 112 16 - COMPOUND_TAIL 114 113 A compound page tail (see description above). 115 114 17 - HUGE 116 - this is an integral part of a HugeTLB page 115 + This is an integral part of a HugeTLB page. 117 116 19 - HWPOISON 118 - hardware detected memory corruption on this page: don't touch the data! 117 + Hardware detected memory corruption on this page: don't touch the data! 119 118 20 - NOPAGE 120 - no page frame exists at the requested address 119 + No page frame exists at the requested address. 121 120 21 - KSM 122 - identical memory pages dynamically shared between one or more processes 121 + Identical memory pages dynamically shared between one or more processes. 123 122 22 - THP 124 - contiguous pages which construct transparent hugepages 123 + Contiguous pages which construct transparent hugepages. 125 124 23 - OFFLINE 126 - page is logically offline 125 + The page is logically offline. 127 126 24 - ZERO_PAGE 128 - zero page for pfn_zero or huge_zero page 127 + Zero page for pfn_zero or huge_zero page. 129 128 25 - IDLE 130 - page has not been accessed since it was marked idle (see 129 + The page has not been accessed since it was marked idle (see 131 130 :ref:`Documentation/admin-guide/mm/idle_page_tracking.rst <idle_page_tracking>`). 132 131 Note that this flag may be stale in case the page was accessed via 133 132 a PTE. To make sure the flag is up-to-date one has to read 134 133 ``/sys/kernel/mm/page_idle/bitmap`` first. 135 134 26 - PGTABLE 136 - page is in use as a page table 135 + The page is in use as a page table. 137 136 138 137 IO related page flags 139 138 --------------------- 140 139 141 140 1 - ERROR 142 - IO error occurred 141 + IO error occurred. 143 142 3 - UPTODATE 144 - page has up-to-date data 143 + The page has up-to-date data. 145 144 ie. for file backed page: (in-memory data revision >= on-disk one) 146 145 4 - DIRTY 147 - page has been written to, hence contains new data 146 + The page has been written to, hence contains new data. 148 147 i.e. for file backed page: (in-memory data revision > on-disk one) 149 148 8 - WRITEBACK 150 - page is being synced to disk 149 + The page is being synced to disk. 151 150 152 151 LRU related page flags 153 152 ---------------------- 154 153 155 154 5 - LRU 156 - page is in one of the LRU lists 155 + The page is in one of the LRU lists. 157 156 6 - ACTIVE 158 - page is in the active LRU list 157 + The page is in the active LRU list. 159 158 18 - UNEVICTABLE 160 - page is in the unevictable (non-)LRU list It is somehow pinned and 159 + The page is in the unevictable (non-)LRU list It is somehow pinned and 161 160 not a candidate for LRU page reclaims, e.g. ramfs pages, 162 - shmctl(SHM_LOCK) and mlock() memory segments 161 + shmctl(SHM_LOCK) and mlock() memory segments. 163 162 2 - REFERENCED 164 - page has been referenced since last LRU list enqueue/requeue 163 + The page has been referenced since last LRU list enqueue/requeue. 165 164 9 - RECLAIM 166 - page will be reclaimed soon after its pageout IO completed 165 + The page will be reclaimed soon after its pageout IO completed. 167 166 11 - MMAP 168 - a memory mapped page 167 + A memory mapped page. 169 168 12 - ANON 170 - a memory mapped page that is not part of a file 169 + A memory mapped page that is not part of a file. 171 170 13 - SWAPCACHE 172 - page is mapped to swap space, i.e. has an associated swap entry 171 + The page is mapped to swap space, i.e. has an associated swap entry. 173 172 14 - SWAPBACKED 174 - page is backed by swap/RAM 173 + The page is backed by swap/RAM. 175 174 176 175 The page-types tool in the tools/vm directory can be used to query the 177 176 above flags.