folioq_nr_slots(9)
β¨ folioq_nr_slots(9) β the kernel API manual, bestie edition β¨
okay so real talk, this one is a lil function from the kernel API manual (folioq_nr_slots) and it's lowkey iconic for how much it refuses to be pinned down. let's get into it π
πΈ NAME πΈ
folioq_nr_slots β it asks a folio queue segment "how many folios can you hold, bestie?" and honestly the answer might be different every time π
π¦ SYNOPSIS π¦
unsigned int folioq_nr_slots (const struct folio_queue *folioq );
that's it, that's the whole vibe check β it takes one arg and hands you back an unsigned int β¨
π ARGUMENTS π
folioqβ the segment we're querying. like, the specific one. the main character of this call π«Ά
π DESCRIPTION π
so what it does: it queries the number of folios that a particular folio queue segment might hold. capacity check, basically π
[!] NOTE: this must not be assumed to be the same for every segment! not me warning you about this specifically π like fr fr, do not hardcode one answer and assume every segment is matching. it's giving "each one is unique, respect it" energy. π
π SEE ALSO π
kernel file ./include/linux/folio_queue.h and literally the whole folio queue friend group:
folioq_init(9)folioq_count(9)folioq_full(9)folioq_is_marked(9)folioq_mark(9)folioq_unmark(9)folioq_is_marked2(9)folioq_mark2(9)folioq_unmark2(9)folioq_append(9)folioq_append_mark(9)folioq_folio(9)folioq_folio_order(9)folioq_folio_size(9)folioq_clear(9)
go read all of them, iykyk π the whole squad ate π₯
anyway that's the page, mwah π it lives in ./include/linux and this version is dated October 2026 β go off, bestie, and remember: every segment is a different size, no cap π§π
π¦ 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