5 ms·
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 a
by wiml 7y ago
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.
- antientropic 7y agoThis 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.txt https://www.kernel.org/doc/Documentation/cgroup-v1/memory.tx....
- packetized 7y agoThe 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.
- Sean1708 7y agoWhat about this? Seems to do what they want. https://serverfault.com/a/949045 https://serverfault.com/a/949045