From d0c00b17a0f1ade77be78ace9392367062a26e83 Mon Sep 17 00:00:00 2001 From: Yu Zhao Date: Tue, 17 May 2022 13:15:42 +0800 Subject: [PATCH] mm:Fix conflict of speculative fault and MGLRU the LRU algorithm doesn't apply to sequential or random reads handle this case in speculative fault Moto-CRs-Fixed:(CR) Change-Id: Ia968c3903e05ee0acb6ae503537ece47e80b099f Signed-off-by: a17671 Reviewed-on: https://gerrit.mot.com/2270849 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- mm/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index 55c7e3393bfa..f0f025de0a48 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4791,7 +4791,9 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address, } mem_cgroup_enter_user_fault(); + lru_gen_enter_fault(vmf.vma); ret = handle_pte_fault(&vmf); + lru_gen_exit_fault(); mem_cgroup_exit_user_fault(); /*