diff options
-rw-r--r-- | mm/swap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/swap.c b/mm/swap.c index 5602f1a1b1e7..2f365d1a4bb2 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -476,6 +476,13 @@ static void drain_cpu_pagevecs(int cpu) */ void deactivate_page(struct page *page) { + /* + * In a workload with many unevictable page such as mprotect, unevictable + * page deactivation for accelerating reclaim is pointless. + */ + if (PageUnevictable(page)) + return; + if (likely(get_page_unless_zero(page))) { struct pagevec *pvec = &get_cpu_var(lru_deactivate_pvecs); |