summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0b97b8ece4a9..b04667848375 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4734,6 +4734,13 @@ long si_mem_available(void)
4734 min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2, 4734 min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2,
4735 wmark_low); 4735 wmark_low);
4736 4736
4737 /*
4738 * Part of the kernel memory, which can be released under memory
4739 * pressure.
4740 */
4741 available += global_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >>
4742 PAGE_SHIFT;
4743
4737 if (available < 0) 4744 if (available < 0)
4738 available = 0; 4745 available = 0;
4739 return available; 4746 return available;