zswap_load(9)
π zswap_load(9) β the kernel API manual, bestie edition π
okay so picture this: it's a zswap_load(9) situation and you're just a girl trying to pull a folio back out of zswap. this is the page for that. pull up a chair. π
β¨ NAME β¨
zswap_load β load a folio from zswap, no cap
πΈ SYNOPSIS πΈ
int zswap_load (struct folio *folio );
π¦ ARGUMENTS π¦
folioβ the folio to load. that's the whole argument. one folio. the folio in question. her. π
π RETURN π
two possible outcomes, and one of them is a whole list, which β plot twist β does not live here, it lives down in DESCRIPTION (iykyk, the manpage writer had a vision):
0on success, with the folio unlocked and marked up-to-date π- or one of the following error codes (listed below, in DESCRIPTION, because we're doing that today π)
π DESCRIPTION π
bestie, here's where the receipts actually are. the error codes, in their full glory:
-EIOβ if the swapped out content was in zswap, but it could not be loaded into the page due to a decompression failure. the folio is unlocked, but NOT marked up-to-date, so that an IO error is emitted (e.g.do_swap_pagewillSIGBUS). π«-EINVALβ if the swapped out content was in zswap, but the page belongs to a large folio, which is not supported by zswap. the folio is unlocked, but NOT marked up-to-date, so that an IO error is emitted (e.g.do_swap_pagewillSIGBUS). π-ENOENTβ if the swapped out content was not in zswap. the folio remains locked on return. so like. it's staying right where it is. π
lowkey important: two of those leave you unlocked but NOT up-to-date (hence the IO error /SIGBUS), while-ENOENTleaves you locked. don't mix them up, bestie, that's the whole vibe check of this page. β
π§ SEE ALSO π§
- Kernel file
./mm/zswap.cβ go read the source, it's giving main character energy π
that's the whole page, fr fr. this little icon came from the ./mm corner of the world, dated October 2026, and you can find her living her best life in the Kernel API Manual as zswap_load(9). go forth and load those folios responsibly π«Άβ¨π
π¦ 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