folio_mark_accessed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_mark_accessed(9) πŸ’…

okay so this is from the Kernel API Manual, and bestie, it's giving β€œtiny function, very specific job.” Let's get into it. πŸ¦‹


✨ NAME ✨

folio_mark_accessed β€” mark a folio as having seen activity. that's it, that's the job. πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

void folio_mark_accessed (struct folio *folio );

🌸 ARGUMENTS 🌸

  • folio β€” the folio you're marking. the one and only argument, slay. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

This function will perform one of the following transitions β€” pick your lane, folio bestie:

  • inactive,unreferenced -> inactive,referenced
  • inactive,referenced -> active,unreferenced
  • active,unreferenced -> active,referenced

When a newly allocated folio is not yet visible, so safe for non-atomic ops, __folio_set_referenced may be substituted for folio_mark_accessed. iykyk: freshly allocated, not-yet-visible folio, non-atomic-ops-safe situation. ✨

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./mm/folio.c:


mwah πŸ’‹ that's the whole page, bestie. source/version is ./mm, dated October 2026, and the function is folio_mark_accessed(9). πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from