]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm/rmap.c: don't call mmu_notifier_invalidate_page() during munlock
authorKonstantin Khlebnikov <koct9i@gmail.com>
Wed, 4 Jun 2014 23:10:51 +0000 (16:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:12 +0000 (16:54 -0700)
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 <koct9i@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/rmap.c

index e375ce4bd93e335678c6152313f9259ecaae9ce9..ab74290d185d58b2579a0c2a01e44e3408d91261 100644 (file)
--- 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;