diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2016-01-15 02:20:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 03:00:49 +0300 |
commit | 84ad5802a33a4964a49b8f7d24d80a214a096b19 (patch) | |
tree | b10ada33ff0dbad4bee898d7fd1dde92016d4f24 /drivers/base | |
parent | a8d0143730d7b42c9fe6d1435d92ecce6863a62a (diff) | |
download | linux-84ad5802a33a4964a49b8f7d24d80a214a096b19.tar.xz |
proc: meminfo: estimate available memory more conservatively
The MemAvailable item in /proc/meminfo is to give users a hint of how
much memory is allocatable without causing swapping, so it excludes the
zones' low watermarks as unavailable to userspace.
However, for a userspace allocation, kswapd will actually reclaim until
the free pages hit a combination of the high watermark and the page
allocator's lowmem protection that keeps a certain amount of DMA and
DMA32 memory from userspace as well.
Subtract the full amount we know to be unavailable to userspace from the
number of free pages when calculating MemAvailable.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions