From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with ESMTP id 76DDB900001 for ; Sun, 1 May 2011 11:04:01 -0400 (EDT) Received: by mail-pw0-f41.google.com with SMTP id 10so3171312pwi.14 for ; Sun, 01 May 2011 08:04:00 -0700 (PDT) From: Minchan Kim Subject: [PATCH 2/2] Filter unevictable page out in deactivate_page Date: Mon, 2 May 2011 00:03:31 +0900 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm , LKML , KAMEZAWA Hiroyuki , Johannes Weiner , Rik van Riel , KOSAKI Motohiro , Mel Gorman , Ying Han , Minchan Kim It's pointless that deactive_page's pagevec operation about unevictable page as it's nop. This patch removes unnecessary overhead which might be a bit problem in case that there are many unevictable page in system(ex, mprotect workload) Signed-off-by: Minchan Kim --- mm/swap.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index 2e9656d..b707694 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -511,6 +511,15 @@ static void drain_cpu_pagevecs(int cpu) */ void deactivate_page(struct page *page) { + + /* + * In workload which system has many unevictable page(ex, mprotect), + * unevictalge 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); -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org