Skip to content

Commit

Permalink
mm/rmap.c: don't call mmu_notifier_invalidate_page() during munlock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Rik van Riel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
koct9i authored and torvalds committed Jun 4, 2014
1 parent 226b4cc commit 3d92860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d92860

Please sign in to comment.