I think in the real world LeanStore doesn't do the the MADV_DONTNEED bit at all though because of performance concerns? Overhead is high (syscall cost, and frequent thrashing about in the kernel VM subsystem). If I recall the vmcache paper gets into this (Virtual-Memory Assisted Buffer Management, SIGMOD 2023). Lots of talk about TLB shootdowns and throughput concerns.
In my own experiments I confirmed the same thing. Just using explicit free lists / allocator techniques was far more performant.
And actually-existing LeanStore on github doesn't use it, anyways. And strangely never has (looking through git history). Even though the paper (2018) describes it. Maybe Leis or Alhamsi can explain.
Curious if Umbra and the CedarDB stuff that came from it do use this approach, too. I seem to recall the Umbra talk speaks about using it.
As a lazy "eventually reclaim when I've got free cycles" technique maybe ok? But revealing that the actual LeanStore C++ code never does it.