From fb1f97dab890e46b74ad8e4df3505a8ebc678066 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Mon, 11 Mar 2019 11:54:50 +0900 Subject: [PATCH] Revert "mm: don't do swap readahead during speculative page fault" This reverts commit c41742ec7ca571b523137e2811cefc0307d1539d. Bug: 128240262 Change-Id: Ide6a3bb060fd1792c1ac5880cfc2298931ad07ed Signed-off-by: Minchan Kim [dereference23: Forward port to msm-5.4] Signed-off-by: Alexander Winkowski --- mm/memory.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 3419f522ba85..59885e20e165 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3156,17 +3156,6 @@ vm_fault_t do_swap_page(struct vm_fault *vmf) lru_cache_add_anon(page); swap_readpage(page, true); } - } else if (vmf->flags & FAULT_FLAG_SPECULATIVE) { - /* - * Don't try readahead during a speculative page fault - * as the VMA's boundaries may change in our back. - * If the page is not in the swap cache and synchronous - * read is disabled, fall back to the regular page fault - * mechanism. - */ - delayacct_clear_flag(DELAYACCT_PF_SWAPIN); - ret = VM_FAULT_RETRY; - goto out; } else { page = swapin_readahead(entry, GFP_HIGHUSER_MOVABLE, vmf);