Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756946Ab1EBKhg (ORCPT ); Mon, 2 May 2011 06:37:36 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:40036 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751437Ab1EBKhc (ORCPT ); Mon, 2 May 2011 06:37:32 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Minchan Kim Subject: Re: [PATCH 2/2] Filter unevictable page out in deactivate_page Cc: kosaki.motohiro@jp.fujitsu.com, Andrew Morton , linux-mm , LKML , KAMEZAWA Hiroyuki , Johannes Weiner , Rik van Riel , Mel Gorman , Ying Han In-Reply-To: References: Message-Id: <20110502193820.2D60.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.56.05 [ja] Date: Mon, 2 May 2011 19:37:30 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 40 > 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; > + Reviewed-by: KOSAKI Motohiro btw, I think we should check PageLRU too. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/