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

Commit 60fd1147 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 free in overcommit logic"

parents d822f25d d97c09c1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -205,6 +205,13 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
		 */
		free += global_page_state(NR_SLAB_RECLAIMABLE);

		/*
		 * Part of the kernel memory, which can be released
		 * under memory pressure.
		 */
		free += global_page_state(
			NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT;

		/*
		 * Leave reserved pages. The pages are not for anonymous pages.
		 */
+7 −0
Original line number Diff line number Diff line
@@ -1879,6 +1879,13 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
		 */
		free += global_page_state(NR_SLAB_RECLAIMABLE);

		/*
		 * Part of the kernel memory, which can be released
		 * under memory pressure.
		 */
		free += global_page_state(
			NR_INDIRECTLY_RECLAIMABLE_BYTES) >> PAGE_SHIFT;

		/*
		 * Leave reserved pages. The pages are not for anonymous pages.
		 */