[$] Keeping COWs in context (a.k.a. anonymous reverse mapping)

Post Syndicated from corbet original https://lwn.net/Articles/1072378/

The kernel’s reverse-mapping machinery is charged with locating the
page-table entries that refer to a given page in memory. The reverse
mapping of anonymous pages is handled differently than for file-backed
pages. The kernel’s implementation of reverse mapping for anonymous pages
is, according to Lorenzo Stoakes in his proposal
for a memory-management-track session at the 2026 Linux Storage,
Filesystem, Memory Management, and BPF Summit
, “a very broken
abstraction
“, due to its complexity. It also has some performance
problems. Stoakes was there to present, in raw form, a proposed
replacement that he calls a “COW context”.