News for hackers. Stuff that matters.
Re:How memory maps (mmap) deliver faster file access in Go by zozbot234 on Friday October 24, 2025 @09:56AM (#45694704)
> userspace doesn’t get a signal from the OS to know when there’s system wide memory pressure

Memory pressure indicators exist, https://docs.kernel.org/accounting/psi.html

> have some way to have a shared data structure where you are told if it’s still resident and can lock it from being paged out.

What's more efficient than fetching data and comparing it with zero? Any write within the range will then cancel the MADV_FREE property on the written-to page thus "locking" it again, and this is also very efficient.

There are no comments on this comment yet.