LWN: Comments on "Proactively reclaiming idle memory" https://lwn.net/Articles/787611/ This is a special feed containing comments posted to the individual LWN article titled "Proactively reclaiming idle memory". en-us Mon, 15 Sep 2025 18:19:48 +0000 Mon, 15 Sep 2025 18:19:48 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Proactively reclaiming idle memory https://lwn.net/Articles/788787/ https://lwn.net/Articles/788787/ flussence <div class="FormattedComment"> The CleanCache/transcendent-memory code is supposed to let userspace code opt in to exactly this way of operation. It'd be perfect for things like X window backing store or decoded media. I've never seen it used in practice on the desktop, sadly.<br> </div> Fri, 17 May 2019 14:25:06 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787801/ https://lwn.net/Articles/787801/ nilsmeyer <div class="FormattedComment"> I kinda like the idea, perhaps it's something one can do on a per cgroup basis?<br> </div> Wed, 08 May 2019 13:29:18 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787794/ https://lwn.net/Articles/787794/ epa <div class="FormattedComment"> Yes, this is a better way to do the OOM killer: pick a process that has a huge number of allocated pages but a small working set, and forget the pages it hasn't accessed in a long time.<br> </div> Wed, 08 May 2019 10:47:40 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787779/ https://lwn.net/Articles/787779/ Fowl <div class="FormattedComment"> This is genius.<br> <p> Be right back, starting a new VC backed startup called 'OOM-YAGNI" immediately!<br> </div> Wed, 08 May 2019 02:28:58 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787778/ https://lwn.net/Articles/787778/ naptastic <div class="FormattedComment"> s/SIGV/SIGKILL/;<br> # Please forgive errors. I'm typing with a 9-month-old in my lap who really enjoys the taste of my headphone cable.<br> </div> Wed, 08 May 2019 02:16:55 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787777/ https://lwn.net/Articles/787777/ naptastic <div class="FormattedComment"> (CW: tangent + entertaining bad idea)<br> <p> I kinda wish the kernel would always actively move anonymous pages to swap if they get used less often than cache/buffer. Then--bear with me here--if the system still gets full, instead of killing processes directly, the kernel should "forget" just enough LRU pages out of swap to keep things running smoothly. Behavior would be controlled with the same /proc/$pid/oom_* knobs everyone already ignores. ;-) A process owning forgotten pages should keep running, but if it tries to access that page, it gets SIGV. On a long-running system, chances are it's a memory leak, and the process will never even know it's gone.<br> <p> You can finally get rid of the 03:25 AM cronjob to restart ${leaky application}, and a class of memory pressure concerns goes away.<br> <p> This is a terrible idea. Do not do this.<br> </div> Wed, 08 May 2019 02:13:48 +0000 Proactively reclaiming idle memory https://lwn.net/Articles/787734/ https://lwn.net/Articles/787734/ flussence <div class="FormattedComment"> This sounds like the existing swap-prefetch mechanism, but in reverse.<br> <p> Since that wasn't mentioned I'll have to ask: couldn't they just make the prefetching bidirectional? Idle pages at the tail of the LRU list would get copied to swap but remain live for as long as possible. Ideally the swap space would float near 100% full, so that by the time reclaim under pressure has to happen little to no IO is needed.<br> </div> Tue, 07 May 2019 16:27:05 +0000