for_each_page_ext(9)
π 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β astruct page_extpointer, and this is where the currentpage_extobject gets returned to you. it's your little delivery slot, basically. π¬__iterβ astruct page_ext_iterobject, 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 π
- Kernel file
./include/linux/page_ext.hβstruct page_ext_operations(9) page_ext_iter_begin(9)page_ext_iter_next(9)page_ext_iter_get(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms