for_each_page_ext(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– for_each_page_ext(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for for_each_page_ext, and it's literally gonna walk you through every single page_ext object like a little tour guide. no cap. πŸ¦‹


🌸 NAME 🌸

for_each_page_ext β€” iterate through page_ext objects.

like, all of them. one at a time. in order. periodt. πŸ’…


✨ SYNOPSIS ✨

for_each_page_ext (__page , __pgcount , __page_ext , __iter );

four args, that's it, you got this 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • __page β€” the page we're interested in πŸ‘€ that's the starting point, the main character of this whole operation.
  • __pgcount β€” how many pages to iterate through. so like, the size of the vibe check. πŸ”₯
  • __page_ext β€” a struct page_ext pointer, and this is where the current page_ext object gets returned to you. it's your little delivery slot, basically. πŸ“¬
  • __iter β€” a struct page_ext_iter object, and here's the thing: it's defined in the stack. so you make it locally, bestie, don't go malloc-ing it. 🧚

πŸ’œ DESCRIPTION πŸ’œ

IMPORTANT: must be called with RCU read lock taken. 😭 like, this is not optional, this is not a suggestion, this is the whole entire rule. take the RCU read lock first or everything is gonna be a mess and not in a cute way. πŸ’€

🌈 SEE ALSO 🌈

go read those too, iykyk πŸ”₯


that's the page, bestie!! πŸŽ€ and for the record, this lil icon comes straight out of ./include/linux and it's dated October 2026 ⭐ β€” so yeah, she's fresh. mwah πŸ’‹ πŸ’–πŸ¦‹πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from