summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-05-08 13:45:54 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-05-08 13:45:54 -0700
commitd822f25d6dd3f06b2568245150b8d300ae7881aa (patch)
treeaa17e8b459f91bfcbdf58cca3d4cea7e3279df57
parentc18ab0bcb79edc8f3fc82d75d9642d17b7536328 (diff)
parent1f350f02fcb9075c8dfbd8f3d329244ebd0fbcd6 (diff)
Merge "mm: treat indirectly reclaimable memory as available in MemAvailable"
-rw-r--r--fs/proc/meminfo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index 9155a5a0d3b9..b7594b9fa5fa 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -79,6 +79,13 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
available += global_page_state(NR_SLAB_RECLAIMABLE) -
min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low);
+ /*
+ * Part of the kernel memory, which can be released under memory
+ * pressure.
+ */
+ available += global_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >>
+ PAGE_SHIFT;
+
if (available < 0)
available = 0;