MADV_FREEed pages should be discarded before working set pages are reclaimed because most of users(ex, tcmalloc and jemalloc) have used it instead of MADV_DONTNEED which zap pages instantly. Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx> --- mm/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory.c b/mm/memory.c index 6f221225f62b..76b683e7d087 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1298,6 +1298,7 @@ static unsigned long lazyfree_pte_range(struct mmu_gather *tlb, ptent = pte_mkclean(ptent); set_pte_at(mm, addr, pte, ptent); tlb_remove_tlb_entry(tlb, pte, addr); + deactivate_page(page); } while (pte++, addr += PAGE_SIZE, addr != end); arch_leave_lazy_mmu_mode(); pte_unmap_unlock(start_pte, ptl); -- 1.9.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>