find_get_entries(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_get_entries(9) β€” Kernel API Manual ✨

okay so bestie, welcome to find_get_entries, from the Kernel API Manual β€” this is the page about gang pagecache lookup and it's honestly kind of a baddie. let's get into it 🫢


🌸 SYNOPSIS 🌸

unsigned find_get_entries (struct address_space *mapping , pgoff_t
*start , pgoff_t end , struct folio_batch *fbatch , pgoff_t *indices );

like, yes, that's the whole signature. it's giving "long but worth it" πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • mapping β€” the address_space we're searching, aka the place we're snooping around in πŸ”
  • start β€” the starting page cache index, where the whole vibe check begins
  • end β€” the final page index, and bestie listen: it's inclusive ✨
  • fbatch β€” where the resulting entries get placed, like the lil basket we're filling up 🧺
  • indices β€” the cache indices that correspond to the entries in entries

πŸ¦‹ DESCRIPTION πŸ¦‹

so find_get_entries will search for and return a batch of entries in the mapping. the entries get placed in fbatch. and important: find_get_entries takes a reference on any actual folios it returns β€” no cap, it's holding onto them πŸ”₯

the entries have ascending indexes. but heads up: the indices may not be consecutive, because of not-present entries or large folios. so don't come for them for being spaced out, it's literally just how it is πŸ’€

any shadow entries of evicted folios, or swap entries from shmem/tmpfs, are included in the returned array. yes, they made the cut, we love an inclusive queen πŸ‘‘


⭐ RETURN ⭐

the number of entries which were found. that's it, that's the whole return value, cute and simple πŸŽ€


🌈 SEE ALSO 🌈

okay this is the long one, buckle up bestie, we're going on a journey through the Kernel file ./mm/filemap.c:

like, that's a whole friend group right there πŸ’œ


ngl this one's a short page but it ate. go read your folios, bestie 🧚

kisses and goodbyes from ./mm, dated October 2026 β€” find_get_entries(9) out, mwah πŸ’‹πŸ’…

πŸ“¦ where this page comes from