From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932092Ab1LNPnw (ORCPT ); Wed, 14 Dec 2011 10:43:52 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40421 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757401Ab1LNPlj (ORCPT ); Wed, 14 Dec 2011 10:41:39 -0500 From: Mel Gorman To: Andrew Morton Cc: Andrea Arcangeli , Minchan Kim , Dave Jones , Jan Kara , Andy Isaacson , Johannes Weiner , Mel Gorman , Rik van Riel , Nai Xia , Linux-MM , LKML Subject: [PATCH 03/11] mm: vmscan: Check if we isolated a compound page during lumpy scan Date: Wed, 14 Dec 2011 15:41:25 +0000 Message-Id: <1323877293-15401-4-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1323877293-15401-1-git-send-email-mgorman@suse.de> References: <1323877293-15401-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrea Arcangeli Properly take into account if we isolated a compound page during the lumpy scan in reclaim and skip over the tail pages when encountered. This corrects the values given to the tracepoint for number of lumpy pages isolated and will avoid breaking the loop early if compound pages smaller than the requested allocation size are requested. [mgorman@suse.de: Updated changelog] Signed-off-by: Andrea Arcangeli Signed-off-by: Mel Gorman Reviewed-by: Minchan Kim --- mm/vmscan.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index f54a05b..faf88b8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1183,13 +1183,16 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, break; if (__isolate_lru_page(cursor_page, mode, file) == 0) { + unsigned int isolated_pages; list_move(&cursor_page->lru, dst); mem_cgroup_del_lru(cursor_page); - nr_taken += hpage_nr_pages(page); - nr_lumpy_taken++; + isolated_pages = hpage_nr_pages(page); + nr_taken += isolated_pages; + nr_lumpy_taken += isolated_pages; if (PageDirty(cursor_page)) - nr_lumpy_dirty++; + nr_lumpy_dirty += isolated_pages; scan++; + pfn += isolated_pages-1; } else { /* * Check if the page is freed already. -- 1.7.3.4