workingset_eviction(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🌈


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