Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4df56926 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: treat indirectly reclaimable memory as available in MemAvailable"

parents 57b864c5 d8399b02
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4320,6 +4320,13 @@ long si_mem_available(void)
	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_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >>
		PAGE_SHIFT;

	if (available < 0)
		available = 0;
	return available;