News for hackers. Stuff that matters.
Re:The Linux kernel's inability to gracefully handle low mem... by wiml on Tuesday August 06, 2019 @12:24AM (#20622114)
OSX handles this with a kqueue event that can notify userland when the system moves between various memory pressure states; this is hooked into by libdispatch and other userland libraries which will discard caches and so on.

I don't see why Linux couldn't do the same; open /sys/kernel/something and epoll on it.

Re:The Linux kernel's inability to gracefully handle low mem... by antientropic on Tuesday August 06, 2019 @02:31AM (#20622722)
This already exists: applications can receive memory pressure events (such as the system reaching "medium" level, where you may want to start freeing some caches) via /sys/fs/cgroup/memory/.../memory.pressure_level. See https://www.kernel.org/doc/Documentation/cgroup-v1/memory.tx....
Re:The Linux kernel's inability to gracefully handle low mem... by packetized on Tuesday August 06, 2019 @02:51AM (#20622805)
The first two nota benes explicitly describe this document being outdated and not what most people expect when it comes to “memory controller”. I am not certain that citing this is a great example.
Re:The Linux kernel's inability to gracefully handle low mem... by Sean1708 on Tuesday August 06, 2019 @09:42AM (#20625052)
What about this? Seems to do what they want.

https://serverfault.com/a/949045