workingset_eviction(9)
β¨ workingset_eviction(9) β¨
okay so bestie, welcome to the kernel API manual π«Ά this one's a <pink>kernel API manual</pink> page and it's all about <hotpink>workingset_eviction</hotpink β like, literally noting the eviction of a folio from memory. that's the whole vibe. π
πΈ NAME πΈ
workingset_eviction β note the eviction of a folio from memory β¨
π¦ SYNOPSIS π¦
void * workingset_eviction (struct folio *folio , struct mem_cgroup
*target_memcg );
like yes, that's the signature, copy it exactly, no notes π
π ARGUMENTS π
folioβ the folio being evicted. that's the main character here π it's the one getting kicked out of memory, no cap.target_memcgβ the cgroup that is causing the reclaim. like, this is who's doing the evicting π so you know whose fault it is.
π RETURN π
it hands you back a <purple>shadow entry</purple> β¨ and that shadow entry is meant to be stored in folio->mapping->i_pages in place of the evicted folio β so that a later <rainbow>refault</rainbow> can be detected. that's the whole point, iykyk π«
lowkey important: the shadow entry goes in place of the folio inside folio->mapping->i_pages. that's the swap, bestie. π
π SEE ALSO π
- the kernel file
./mm/workingset.cπ workingset_age_nonresident(9)workingset_test_recent(9)workingset_refault(9)workingset_activation(9)
okay that's the whole page, go be iconic with it π sign-off time: this one comes from ./mm, dated <cyan>October 2026</cyan> β mwah, stan the kernel, periodt. ππ¦π
π¦ 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