diff options
author | Minchan Kim <minchan.kim@gmail.com> | 2011-05-24 20:12:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:39:27 -0400 |
commit | 821ed6bbed3cf41c4050a431eeb822b33868d36a (patch) | |
tree | 50f6808a20263aaaf546a69218e1c1312ce7b51e /mm/swap.c | |
parent | 2cbea1d3ab11946885d37a2461072ee4d687cb4e (diff) |
mm: filter unevictable page out in deactivate_page()
It's pointless that deactive_page's operates on unevictable pages. This
patch removes unnecessary overhead which might be a bit problem in case
that there are many unevictable page in system(ex, mprotect workload)
[akpm@linux-foundation.org: tidy up comment]
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -476,6 +476,13 @@ static void drain_cpu_pagevecs(int cpu) | |||
476 | */ | 476 | */ |
477 | void deactivate_page(struct page *page) | 477 | void deactivate_page(struct page *page) |
478 | { | 478 | { |
479 | /* | ||
480 | * In a workload with many unevictable page such as mprotect, unevictable | ||
481 | * page deactivation for accelerating reclaim is pointless. | ||
482 | */ | ||
483 | if (PageUnevictable(page)) | ||
484 | return; | ||
485 | |||
479 | if (likely(get_page_unless_zero(page))) { | 486 | if (likely(get_page_unless_zero(page))) { |
480 | struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs); | 487 | struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs); |
481 | 488 | ||