Commit 0d16cfd4 authored by SeongJae Park's avatar SeongJae Park Committed by Linus Torvalds

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.orgSigned-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b1eee3c5
...@@ -90,13 +90,14 @@ Short descriptions to the page flags ...@@ -90,13 +90,14 @@ Short descriptions to the page flags
==================================== ====================================
0 - LOCKED 0 - LOCKED
page is being locked for exclusive access, e.g. by undergoing read/write IO The page is being locked for exclusive access, e.g. by undergoing read/write
IO.
7 - SLAB 7 - SLAB
page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator The 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 When compound page is used, SLUB/SLQB will only set this flag on the head
page; SLOB will not flag it at all. page; SLOB will not flag it at all.
10 - BUDDY 10 - BUDDY
a free memory block managed by the buddy system allocator A free memory block managed by the buddy system allocator.
The buddy system organizes free memory in blocks of various orders. 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 An order N block has 2^N physically contiguous pages, with the BUDDY flag
set for and _only_ for the first page. set for and _only_ for the first page.
...@@ -112,65 +113,65 @@ Short descriptions to the page flags ...@@ -112,65 +113,65 @@ Short descriptions to the page flags
16 - COMPOUND_TAIL 16 - COMPOUND_TAIL
A compound page tail (see description above). A compound page tail (see description above).
17 - HUGE 17 - HUGE
this is an integral part of a HugeTLB page This is an integral part of a HugeTLB page.
19 - HWPOISON 19 - HWPOISON
hardware detected memory corruption on this page: don't touch the data! Hardware detected memory corruption on this page: don't touch the data!
20 - NOPAGE 20 - NOPAGE
no page frame exists at the requested address No page frame exists at the requested address.
21 - KSM 21 - KSM
identical memory pages dynamically shared between one or more processes Identical memory pages dynamically shared between one or more processes.
22 - THP 22 - THP
contiguous pages which construct transparent hugepages Contiguous pages which construct transparent hugepages.
23 - OFFLINE 23 - OFFLINE
page is logically offline The page is logically offline.
24 - ZERO_PAGE 24 - ZERO_PAGE
zero page for pfn_zero or huge_zero page Zero page for pfn_zero or huge_zero page.
25 - IDLE 25 - IDLE
page has not been accessed since it was marked idle (see The page has not been accessed since it was marked idle (see
:ref:`Documentation/admin-guide/mm/idle_page_tracking.rst <idle_page_tracking>`). :ref:`Documentation/admin-guide/mm/idle_page_tracking.rst <idle_page_tracking>`).
Note that this flag may be stale in case the page was accessed via 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 a PTE. To make sure the flag is up-to-date one has to read
``/sys/kernel/mm/page_idle/bitmap`` first. ``/sys/kernel/mm/page_idle/bitmap`` first.
26 - PGTABLE 26 - PGTABLE
page is in use as a page table The page is in use as a page table.
IO related page flags IO related page flags
--------------------- ---------------------
1 - ERROR 1 - ERROR
IO error occurred IO error occurred.
3 - UPTODATE 3 - UPTODATE
page has up-to-date data The page has up-to-date data.
ie. for file backed page: (in-memory data revision >= on-disk one) ie. for file backed page: (in-memory data revision >= on-disk one)
4 - DIRTY 4 - DIRTY
page has been written to, hence contains new data The page has been written to, hence contains new data.
i.e. for file backed page: (in-memory data revision > on-disk one) i.e. for file backed page: (in-memory data revision > on-disk one)
8 - WRITEBACK 8 - WRITEBACK
page is being synced to disk The page is being synced to disk.
LRU related page flags LRU related page flags
---------------------- ----------------------
5 - LRU 5 - LRU
page is in one of the LRU lists The page is in one of the LRU lists.
6 - ACTIVE 6 - ACTIVE
page is in the active LRU list The page is in the active LRU list.
18 - UNEVICTABLE 18 - UNEVICTABLE
page is in the unevictable (non-)LRU list It is somehow pinned and 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, not a candidate for LRU page reclaims, e.g. ramfs pages,
shmctl(SHM_LOCK) and mlock() memory segments shmctl(SHM_LOCK) and mlock() memory segments.
2 - REFERENCED 2 - REFERENCED
page has been referenced since last LRU list enqueue/requeue The page has been referenced since last LRU list enqueue/requeue.
9 - RECLAIM 9 - RECLAIM
page will be reclaimed soon after its pageout IO completed The page will be reclaimed soon after its pageout IO completed.
11 - MMAP 11 - MMAP
a memory mapped page A memory mapped page.
12 - ANON 12 - ANON
a memory mapped page that is not part of a file A memory mapped page that is not part of a file.
13 - SWAPCACHE 13 - SWAPCACHE
page is mapped to swap space, i.e. has an associated swap entry The page is mapped to swap space, i.e. has an associated swap entry.
14 - SWAPBACKED 14 - SWAPBACKED
page is backed by swap/RAM The page is backed by swap/RAM.
The page-types tool in the tools/vm directory can be used to query the The page-types tool in the tools/vm directory can be used to query the
above flags. above flags.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment