From 84d7f52bcbb4025b67e304fefc008a7e45bdcb74 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Mon, 17 Aug 2020 20:48:18 -0700 Subject: [PATCH] mm: Allow pages that are swapped in to come from the movable zone Pages that are swapped out are pages that can reside in the movable zone. However, when they are swapped in, they are restricted to the normal zone, when they can reside in the movable zone again. Set the GFP flags accordingly for swapin allocations, so that they can be satisfied from the movable zone. Change-Id: I25919034a5197a1c4f830e498d32347aa460187f Signed-off-by: Isaac J. Manjarres --- mm/memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 785ef5e778e9..729f02b262ba 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2970,8 +2970,9 @@ vm_fault_t do_swap_page(struct vm_fault *vmf) if (si->flags & SWP_SYNCHRONOUS_IO && __swap_count(entry) == 1) { /* skip swapcache */ - page = alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_CMA, - vma, vmf->address); + page = alloc_page_vma(GFP_HIGHUSER_MOVABLE | __GFP_CMA + | __GFP_OFFLINABLE, vma, + vmf->address); if (page) { __SetPageLocked(page); __SetPageSwapBacked(page);