Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757808Ab1ECAaC (ORCPT ); Mon, 2 May 2011 20:30:02 -0400 Received: from mail-qy0-f181.google.com ([209.85.216.181]:58678 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010Ab1ECAaA convert rfc822-to-8bit (ORCPT ); Mon, 2 May 2011 20:30:00 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xr0zRCaP0iharxQL8CpHqTa83XB3EfkcJDUjwvaYxwYhx3nE8p5A7SfPlUvG+uLOyY 89Q3OMuA300gULJngFOjm918VLz1AiPrvVAFeTJFc5mNe9hCgfHioMQoqIdN6cRjKBCl c/T2S0bEFmSkg74RuKJnlnGtNl3eTK7uOcisQ= MIME-Version: 1.0 In-Reply-To: <20110502193820.2D60.A69D9226@jp.fujitsu.com> References: <20110502193820.2D60.A69D9226@jp.fujitsu.com> Date: Tue, 3 May 2011 09:29:59 +0900 Message-ID: Subject: Re: [PATCH 2/2] Filter unevictable page out in deactivate_page From: Minchan Kim To: KOSAKI Motohiro Cc: Andrew Morton , linux-mm , LKML , KAMEZAWA Hiroyuki , Johannes Weiner , Rik van Riel , Mel Gorman , Ying Han Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 55 Hi KOSAKI, On Mon, May 2, 2011 at 7:37 PM, KOSAKI Motohiro wrote: >> 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 > Thanks! > > btw, I think we should check PageLRU too. > Yes. I remember you advised it when we push this patch but I didn't. That's because I think most of pages in such context would be LRU as they are cached pages. So IMO, PageLRU checking in deactivate_page couldn't help much. -- Kind regards, Minchan Kim -- 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/