folio_wait_...ack_killable(9)
π folio_wait_writeback_killable(9) β the "please finish writing, bestie" page
okay so this is a page from the Kernel API Manual and it's all about folio_wait_writeback_killable β like yes the page header lowkey truncates it to folio_wait_...ack_killable(9) because man page headers are dramatic like that, but bestie the real name is right there in the NAME section. let's go π
β¨ NAME β¨
folio_wait_writeback_killable β wait for a folio to finish writeback. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
int folio_wait_writeback_killable (struct folio *folio );
π¦ ARGUMENTS π¦
folioβ the folio you're waiting on. your little guy. the one you're obsessed with. π«Ά
π₯ DESCRIPTION π₯
so if the folio is currently being written back to storage (like, it's mid-glow-up, being saved to disk), you wait for the I/O to complete β OR for a fatal signal to arrive. whichever hits first, no cap. π
π CONTEXT π
okay this part matters, so listen:
- it sleeps π€
- it must be called in process context
- and with no spinlocks held β none. zero. don't do it. π
- the caller should hold a reference on the folio
- and heads up: if the folio is not locked, writeback may start again after writeback has finished. it's giving "we're so back" energy, it can literally loop back around. so lock it if you don't want that. β
π RETURN π
0on success β slay, it worked π-EINTRif we get a fatal signal while waiting β the wait got interrupted, rip π
π SEE ALSO π
the source of all this lore lives in the kernel file ./mm/page-writeback.c, and if you want the whole friend group:
node_dirtyable_memory(9)global_dirtyable_memory(9)domain_dirty_limits(9)global_dirty_limits(9)node_dirty_limit(9)node_dirty_ok(9)__wb_calc_thresh(9)balance_dirty_pages_ratelimited_flags(9)balance_dirty_pages_ratelimited(9)wb_over_bg_thresh(9)tag_pages_for_writeback(9)writeback_iter(9)filemap_dirty_folio(9)folio_redirty_for_writepage(9)folio_mark_dirty(9)folio_wait_writeback(9)folio_wait_stable(9)
fr fr this one's a sleeper (literally) β you're blocking, so don't call it from anywhere spicy. no spinlocks. i'm serious. π
and that's the page!! mwah π this little gem comes to you courtesy of ./mm, dated October 2026, and it's the folio_wait_...ack_killable(9) page β yes, still truncated in the footer, no I will not be explaining that, iykyk π§β¨
π¦ 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