shmem_writeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… shmem_writeout β€” a kernel API manual, but make it make sense

okay so bestie, you found your way to shmem_writeout(9), the third section (kernel API) manual page. pull up a chair, grab a strawberry πŸ“, and let's get into it β€” this one's short but she's iconic.


✨ NAME ✨

shmem_writeout β€” literally just: write the folio to swap. that's the whole vibe. πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int shmem_writeout (struct swap_io_ctx *ctx , struct folio *folio ,
       struct list_head *folio_list );

like yes, it returns an int, and yes, those are the exact parameters, don't @ me.


πŸŽ€ ARGUMENTS πŸŽ€

  • ctx β€” the swap I/O context. she's the whole situation, the group chat the operation happens in. 🫢
  • folio β€” the folio to write. the main character, fr fr. πŸ‘‘
  • folio_list β€” the list to put back folios on split. yes, "on split" β€” that's the exact wording, i'm not making this up. 😭

πŸ”₯ DESCRIPTION πŸ”₯

move the folio from the page cache to the swap cache. that's it. that's the description. no cap, no extra lore, just a relocation. the way that she just moves πŸ’…


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ“šβœ¨


lowkey a warning-ish thing: the manpage doesn't editorialize here, but do note the folio_list argument exists specifically for putting folios back on split β€” don't just pass garbage, bestie. πŸ™ˆ

and that's the page!! 🧚 source/version: ./mm, dated October 2026, and the whole thing is filed under shmem_writeout(9). mwah, go write some folios πŸ’œπŸŒΈ

πŸ“¦ where this page comes from