From: Vlastimil Babka Date: Wed, 11 Sep 2013 21:22:33 +0000 (-0700) Subject: mm: munlock: remove redundant get_page/put_page pair on the fast path X-Git-Tag: v3.12-rc1~52^2~187 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b40998ae35cf64561868370e6c9f3d3e94b6bf7;p=pandora-kernel.git mm: munlock: remove redundant get_page/put_page pair on the fast path The performance of the fast path in munlock_vma_range() can be further improved by avoiding atomic ops of a redundant get_page()/put_page() pair. When calling get_page() during page isolation, we already have the pin from follow_page_mask(). This pin will be then returned by __pagevec_lru_add(), after which we do not reference the pages anymore. After this patch, an 8% speedup was measured for munlocking a 56GB large memory area with THP disabled. Signed-off-by: Vlastimil Babka Reviewed-by: Jörn Engel Acked-by: Mel Gorman Cc: Michel Lespinasse Cc: Hugh Dickins Cc: Rik van Riel Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed