The purpose of this patch is to get rid of the lame percentage calculations in
lowmem.c. Currently, the limits (measured in pages) are calculated from
percentages every time somebody from userspace requests some memory. With this
patch, the limits are in pages and furthermore, they are specified as minimum
amount of "free pages", instead of as maximum amount of "used pages". "Free"
means free pages or such pages that can easily be freed by the VM system.
This patch changes the names of the lowmem sysctl limits in /proc/sys/vm:
lowmem_deny_watermark => lowmem_deny_watermark_pages
lowmem_notify_low => lowmem_notify_low_pages
lowmem_notify_high => lowmem_notify_high_pages
The following read only value disappears:
lowmem_used_pages
The following read only value is introduced:
lowmem_free_pages
The old value can be calculated from userspace with the following pseudocode:
Note that the value of lowmem_free_pages is only accurate when the system is
rather low on memory (otherwise it's a bit too pessimistic), this was true also
for the lowmem_used_pages metric.
Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>