top | item 28764867

(no title)

gsvelto | 4 years ago

Recent Linux kernels allow you to measure memory consumption from a QoS point-of-view via pressure stall information: https://www.kernel.org/doc/html/latest/accounting/psi.html

This isn't the same thing as detecting how much memory is available because Linux overcommits by default. PSI will tell you when the kernel is swapping too much (depending on the thresholds you set) and from that you can infer the user is running low on memory.

Android's lowmemkiller had an explicit free memory threshold userspace could set to be notified. Starting with Android 11 however it's now using PSI too IIRC.

discuss

order

No comments yet.