From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 545649000C1 for ; Tue, 26 Apr 2011 12:26:04 -0400 (EDT) Received: by mail-iw0-f169.google.com with SMTP id 8so955640iwg.14 for ; Tue, 26 Apr 2011 09:26:03 -0700 (PDT) From: Minchan Kim Subject: [RFC 5/8] compaction: remove active list counting Date: Wed, 27 Apr 2011 01:25:22 +0900 Message-Id: <2b79bbf9ddceb73624f49bbe9477126147d875fd.1303833417.git.minchan.kim@gmail.com> In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm , LKML , Christoph Lameter , Johannes Weiner , KAMEZAWA Hiroyuki , Minchan Kim , KOSAKI Motohiro , Mel Gorman , Rik van Riel , Andrea Arcangeli acct_isolated of compaction uses page_lru_base_type which returns only base type of LRU list so it never returns LRU_ACTIVE_ANON or LRU_ACTIVE_FILE. So it's pointless to add lru[LRU_ACTIVE_[ANON|FILE]] to get sum. Cc: KOSAKI Motohiro Cc: Mel Gorman Cc: Rik van Riel Cc: Andrea Arcangeli Signed-off-by: Minchan Kim --- mm/compaction.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 9f80b5a..653b02b 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -219,8 +219,8 @@ static void acct_isolated(struct zone *zone, struct compact_control *cc) count[lru]++; } - cc->nr_anon = count[LRU_ACTIVE_ANON] + count[LRU_INACTIVE_ANON]; - cc->nr_file = count[LRU_ACTIVE_FILE] + count[LRU_INACTIVE_FILE]; + cc->nr_anon = count[LRU_INACTIVE_ANON]; + cc->nr_file = count[LRU_INACTIVE_FILE]; __mod_zone_page_state(zone, NR_ISOLATED_ANON, cc->nr_anon); __mod_zone_page_state(zone, NR_ISOLATED_FILE, cc->nr_file); } -- 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