diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 8a74b9705a655cf5809003bf7d92edc983c4dddc..37d6c4be632fb5f5112304258b686e550f4ff5b7 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -931,6 +931,11 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm, } vmf.pte--; pte_unmap(vmf.pte); + + /* Drain LRU add pagevec to remove extra pin on the swapped in pages */ + if (swapped_in) + lru_add_drain(); + trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 1); return true; }