From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933084AbXB0Tga (ORCPT ); Tue, 27 Feb 2007 14:36:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933081AbXB0Tga (ORCPT ); Tue, 27 Feb 2007 14:36:30 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:41101 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933084AbXB0Tg3 (ORCPT ); Tue, 27 Feb 2007 14:36:29 -0500 From: Andy Whitcroft To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andy Whitcroft , Mel Gorman Subject: [PATCH 5/5] lumpy: only check for valid pages when holes are present References: InReply-To: Message-ID: <297d400448043264b3e5afe21291485e@kernel> Date: Tue, 27 Feb 2007 11:36:24 -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org We only need to check that each page is valid with pfn_valid when we are on an architecture which had holes within zones. Make this check conditional. Signed-off-by: Andy Whitcroft --- diff --git a/mm/vmscan.c b/mm/vmscan.c index bef7e92..f249ad7 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -725,9 +725,11 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, /* The target page is in the block, ignore it. */ if (unlikely(pfn == page_pfn)) continue; +#ifdef CONFIG_HOLES_IN_ZONE /* Avoid holes within the zone. */ if (unlikely(!pfn_valid(pfn))) break; +#endif cursor_page = pfn_to_page(pfn); /* Check that we have not crossed a zone boundary. */