From: Konstantin Khlebnikov Date: Wed, 4 Jun 2014 23:10:51 +0000 (-0700) Subject: mm/rmap.c: don't call mmu_notifier_invalidate_page() during munlock X-Git-Tag: v4.9.8~6270^2~16^2~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d92860f979f725a9c10c2fc26c0415a4332adbf;p=platform%2Fkernel%2Flinux-rpi3.git mm/rmap.c: don't call mmu_notifier_invalidate_page() during munlock In its munmap mode, try_to_unmap_one() searches other mlocked vmas, it never unmaps pages. There is no reason for invalidation because ptes are left unchanged. Signed-off-by: Konstantin Khlebnikov Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/rmap.c b/mm/rmap.c index e375ce4..ab74290 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1252,7 +1252,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, out_unmap: pte_unmap_unlock(pte, ptl); - if (ret != SWAP_FAIL) + if (ret != SWAP_FAIL && TTU_ACTION(flags) != TTU_MUNLOCK) mmu_notifier_invalidate_page(mm, address); out: return ret;