proc_kpageflags(5)

โœจ NAME โœจ

/proc/kpageflags โ€” physical pages frame masks ๐Ÿ’…

okay bestie, welcome to the File Formats Manual, section 5, and today's main character is a lil file in /proc that hands you the receipts on every single physical page frame in your machine. it's giving very much "behind the scenes of your RAM" energy and I'm obsessed.


๐ŸŒธ DESCRIPTION ๐ŸŒธ

/proc/kpageflags (since Linux 2.6.25) ๐ŸŽ€

so this file? it's a whole vibe. it contains 64-bit masks corresponding to each physical page frame, and it's indexed by page frame number โ€” like, you wanna know about a page, you look it up by its number, periodt. (for the whole lore on that indexing thing, go read the discussion of /proc/pid/pagemap, iykyk.)

the bits are as follows, and no I did not skip a single one, we do NOT leave bits out in this house ๐Ÿ’–:

        0   -   KPF_LOCKED
        1   -   KPF_ERROR
        2   -   KPF_REFERENCED
        3   -   KPF_UPTODATE
        4   -   KPF_DIRTY
        5   -   KPF_LRU
        6   -   KPF_ACTIVE
        7   -   KPF_SLAB
        8   -   KPF_WRITEBACK
        9   -   KPF_RECLAIM
       10   -   KPF_BUDDY
       11   -   KPF_MMAP            (since Linux 2.6.31)
       12   -   KPF_ANON            (since Linux 2.6.31)
       13   -   KPF_SWAPCACHE       (since Linux 2.6.31)
       14   -   KPF_SWAPBACKED      (since Linux 2.6.31)
       15   -   KPF_COMPOUND_HEAD   (since Linux 2.6.31)
       16   -   KPF_COMPOUND_TAIL   (since Linux 2.6.31)
       17   -   KPF_HUGE            (since Linux 2.6.31)
       18   -   KPF_UNEVICTABLE     (since Linux 2.6.31)
       19   -   KPF_HWPOISON        (since Linux 2.6.31)
       20   -   KPF_NOPAGE          (since Linux 2.6.31)
       21   -   KPF_KSM             (since Linux 2.6.32)
       22   -   KPF_THP             (since Linux 3.4)
       23   -   KPF_BALLOON         (since Linux 3.18)
       24   -   KPF_ZERO_PAGE       (since Linux 4.0)
       25   -   KPF_IDLE            (since Linux 4.3)
       26   -   KPF_PGTABLE         (since Linux 4.18)

twenty-seven bits, zero skips, we ate ๐Ÿ“


wanna know what each of those lil bits actually means? like, in depth? go peek at the kernel source file Documentation/admin-guide/mm/pagemap.rst ๐Ÿฆ‹ it's all in there.

โš ๏ธ okay important tea, don't skip this one: before Linux 2.6.29, KPF_WRITEBACK, KPF_RECLAIM, KPF_BUDDY, and KPF_LOCKED did not report correctly. so if you're on something ancient, those four were lowkey lying to you ๐Ÿ˜ญ don't trust them.
๐Ÿซถ also: the /proc/kpageflags file only even exists if the CONFIG_PROC_PAGE_MONITOR kernel configuration option is enabled. no config, no file, no vibes. simple as that.

๐Ÿ’œ SEE ALSO ๐Ÿ’œ


and that's the whole page, bestie โœจ this was the proc_kpageflags(5) manual, fresh out of Linux man-pages 6.20, dated 2026-02-08 โ€” go forth and vibe check your page frames ๐Ÿ’–๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-3.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms