]> Git Repo - linux.git/commit
mm: accelerate munlock() treatment of THP pages
authorMichel Lespinasse <[email protected]>
Thu, 28 Feb 2013 01:02:44 +0000 (17:02 -0800)
committerLinus Torvalds <[email protected]>
Thu, 28 Feb 2013 03:10:09 +0000 (19:10 -0800)
commitff6a6da60b894d008f704fbeb5bc596f9994b16e
tree84c0fd2850edcd836afee8f9c542d4d4d98602f4
parentc5a51053cf3b499ddba60a89ab067ea05ad15840
mm: accelerate munlock() treatment of THP pages

munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE
at a time.  When munlocking THP pages (or the huge zero page), this
resulted in taking the mm->page_table_lock 512 times in a row.

We can do better by making use of the page_mask returned by
follow_page_mask (for the huge zero page case), or the size of the page
munlock_vma_page() operated on (for the true THP page case).

Signed-off-by: Michel Lespinasse <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/internal.h
mm/mlock.c
This page took 0.060117 seconds and 4 git commands to generate.